grpc-js: Export propagate constants for type parity with grpc

This commit is contained in:
Michael Lumish 2020-06-08 16:36:12 -07:00
parent 066950a71b
commit d9b7b098a7
2 changed files with 15 additions and 2 deletions

View File

@ -41,8 +41,20 @@ export enum LogVerbosity {
ERROR,
}
/**
* NOTE: This enum is not currently used in any implemented API in this
* library. It is included only for type parity with the other implementation.
*/
export enum Propagate {
DEADLINE = 1,
CENSUS_STATS_CONTEXT = 2,
CENSUS_TRACING_CONTEXT = 4,
CANCELLATION = 8,
DEFAULTS = 65536,
}
// -1 means unlimited
export const DEFAULT_MAX_SEND_MESSAGE_LENGTH = -1;
// 4 MB default
export const DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH = 4 * 1024 * 1024;
export const DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH = 4 * 1024 * 1024;

View File

@ -36,7 +36,7 @@ import {
CallProperties,
UnaryCallback,
} from './client';
import { LogVerbosity, Status } from './constants';
import { LogVerbosity, Status, Propagate } from './constants';
import * as logging from './logging';
import {
Deserialize,
@ -127,6 +127,7 @@ export {
LogVerbosity as logVerbosity,
Status as status,
ConnectivityState as connectivityState,
Propagate as propagate,
// TODO: Other constants as well
};