1 |
|
2 | import { StatusObject, WriteObject } from './call-interface';
|
3 | import { Metadata } from './metadata';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export interface Filter {
|
11 | sendMetadata(metadata: Promise<Metadata>): Promise<Metadata>;
|
12 | receiveMetadata(metadata: Metadata): Metadata;
|
13 | sendMessage(message: Promise<WriteObject>): Promise<WriteObject>;
|
14 | receiveMessage(message: Promise<Buffer>): Promise<Buffer>;
|
15 | receiveTrailers(status: StatusObject): StatusObject;
|
16 | }
|
17 | export declare abstract class BaseFilter implements Filter {
|
18 | sendMetadata(metadata: Promise<Metadata>): Promise<Metadata>;
|
19 | receiveMetadata(metadata: Metadata): Metadata;
|
20 | sendMessage(message: Promise<WriteObject>): Promise<WriteObject>;
|
21 | receiveMessage(message: Promise<Buffer>): Promise<Buffer>;
|
22 | receiveTrailers(status: StatusObject): StatusObject;
|
23 | }
|
24 | export interface FilterFactory<T extends Filter> {
|
25 | createFilter(): T;
|
26 | }
|