UNPKG

969 BTypeScriptView Raw
1/// <reference types="node" />
2import { StatusObject, WriteObject } from './call-interface';
3import { Filter, FilterFactory } from './filter';
4import { Metadata } from './metadata';
5export declare class FilterStack implements Filter {
6 private readonly filters;
7 constructor(filters: Filter[]);
8 sendMetadata(metadata: Promise<Metadata>): Promise<Metadata>;
9 receiveMetadata(metadata: Metadata): Metadata;
10 sendMessage(message: Promise<WriteObject>): Promise<WriteObject>;
11 receiveMessage(message: Promise<Buffer>): Promise<Buffer>;
12 receiveTrailers(status: StatusObject): StatusObject;
13 push(filters: Filter[]): void;
14 getFilters(): Filter[];
15}
16export declare class FilterStackFactory implements FilterFactory<FilterStack> {
17 private readonly factories;
18 constructor(factories: Array<FilterFactory<Filter>>);
19 push(filterFactories: FilterFactory<Filter>[]): void;
20 clone(): FilterStackFactory;
21 createFilter(): FilterStack;
22}