Skip to content

Commit f52d142

Browse files
committed
grpc-js: Implement server interceptors
1 parent 666a374 commit f52d142

File tree

10 files changed

+1544
-858
lines changed

10 files changed

+1544
-858
lines changed

packages/grpc-js/src/call-interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface StatusObject {
3737
}
3838

3939
export type PartialStatusObject = Pick<StatusObject, 'code' | 'details'> & {
40-
metadata: Metadata | null;
40+
metadata?: Metadata | null | undefined;
4141
};
4242

4343
export const enum WriteFlags {

packages/grpc-js/src/index.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import {
4949
import { Metadata, MetadataOptions, MetadataValue } from './metadata';
5050
import {
5151
Server,
52+
ServerOptions,
5253
UntypedHandleCall,
5354
UntypedServiceImplementation,
5455
} from './server';
@@ -226,7 +227,7 @@ export const setLogVerbosity = (verbosity: LogVerbosity): void => {
226227
logging.setLoggerVerbosity(verbosity);
227228
};
228229

229-
export { Server };
230+
export { Server, ServerOptions };
230231
export { ServerCredentials };
231232
export { KeyCertPair };
232233

@@ -264,6 +265,18 @@ export { addAdminServicesToServer } from './admin';
264265

265266
export { ServiceConfig, LoadBalancingConfig, MethodConfig, RetryPolicy } from './service-config';
266267

268+
export {
269+
ServerListener,
270+
FullServerListener,
271+
ServerListenerBuilder,
272+
Responder,
273+
FullResponder,
274+
ResponderBuilder,
275+
ServerInterceptingCallInterface,
276+
ServerInterceptingCall,
277+
ServerInterceptor
278+
} from './server-interceptors';
279+
267280
import * as experimental from './experimental';
268281
export { experimental };
269282

0 commit comments

Comments
 (0)