mirror of https://github.com/grpc/grpc-node.git
grpc-js: Export propagate constants for type parity with grpc
This commit is contained in:
parent
066950a71b
commit
d9b7b098a7
|
|
@ -41,8 +41,20 @@ export enum LogVerbosity {
|
||||||
ERROR,
|
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
|
// -1 means unlimited
|
||||||
export const DEFAULT_MAX_SEND_MESSAGE_LENGTH = -1;
|
export const DEFAULT_MAX_SEND_MESSAGE_LENGTH = -1;
|
||||||
|
|
||||||
// 4 MB default
|
// 4 MB default
|
||||||
export const DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH = 4 * 1024 * 1024;
|
export const DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH = 4 * 1024 * 1024;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import {
|
||||||
CallProperties,
|
CallProperties,
|
||||||
UnaryCallback,
|
UnaryCallback,
|
||||||
} from './client';
|
} from './client';
|
||||||
import { LogVerbosity, Status } from './constants';
|
import { LogVerbosity, Status, Propagate } from './constants';
|
||||||
import * as logging from './logging';
|
import * as logging from './logging';
|
||||||
import {
|
import {
|
||||||
Deserialize,
|
Deserialize,
|
||||||
|
|
@ -127,6 +127,7 @@ export {
|
||||||
LogVerbosity as logVerbosity,
|
LogVerbosity as logVerbosity,
|
||||||
Status as status,
|
Status as status,
|
||||||
ConnectivityState as connectivityState,
|
ConnectivityState as connectivityState,
|
||||||
|
Propagate as propagate,
|
||||||
// TODO: Other constants as well
|
// TODO: Other constants as well
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue