Merge pull request #1468 from murgatroid99/grpc-js_propagate-constants

grpc-js: Export propagate constants for type parity with grpc
This commit is contained in:
Michael Lumish 2020-06-15 15:02:20 -07:00 committed by GitHub
commit 1d14203c38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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
};