UNPKG

3.11 kBJavaScriptView Raw
1"use strict";
2/*
3 * Copyright 2019 gRPC authors.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18Object.defineProperty(exports, "__esModule", { value: true });
19exports.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH = exports.DEFAULT_MAX_SEND_MESSAGE_LENGTH = exports.Propagate = exports.LogVerbosity = exports.Status = void 0;
20var Status;
21(function (Status) {
22 Status[Status["OK"] = 0] = "OK";
23 Status[Status["CANCELLED"] = 1] = "CANCELLED";
24 Status[Status["UNKNOWN"] = 2] = "UNKNOWN";
25 Status[Status["INVALID_ARGUMENT"] = 3] = "INVALID_ARGUMENT";
26 Status[Status["DEADLINE_EXCEEDED"] = 4] = "DEADLINE_EXCEEDED";
27 Status[Status["NOT_FOUND"] = 5] = "NOT_FOUND";
28 Status[Status["ALREADY_EXISTS"] = 6] = "ALREADY_EXISTS";
29 Status[Status["PERMISSION_DENIED"] = 7] = "PERMISSION_DENIED";
30 Status[Status["RESOURCE_EXHAUSTED"] = 8] = "RESOURCE_EXHAUSTED";
31 Status[Status["FAILED_PRECONDITION"] = 9] = "FAILED_PRECONDITION";
32 Status[Status["ABORTED"] = 10] = "ABORTED";
33 Status[Status["OUT_OF_RANGE"] = 11] = "OUT_OF_RANGE";
34 Status[Status["UNIMPLEMENTED"] = 12] = "UNIMPLEMENTED";
35 Status[Status["INTERNAL"] = 13] = "INTERNAL";
36 Status[Status["UNAVAILABLE"] = 14] = "UNAVAILABLE";
37 Status[Status["DATA_LOSS"] = 15] = "DATA_LOSS";
38 Status[Status["UNAUTHENTICATED"] = 16] = "UNAUTHENTICATED";
39})(Status = exports.Status || (exports.Status = {}));
40var LogVerbosity;
41(function (LogVerbosity) {
42 LogVerbosity[LogVerbosity["DEBUG"] = 0] = "DEBUG";
43 LogVerbosity[LogVerbosity["INFO"] = 1] = "INFO";
44 LogVerbosity[LogVerbosity["ERROR"] = 2] = "ERROR";
45 LogVerbosity[LogVerbosity["NONE"] = 3] = "NONE";
46})(LogVerbosity = exports.LogVerbosity || (exports.LogVerbosity = {}));
47/**
48 * NOTE: This enum is not currently used in any implemented API in this
49 * library. It is included only for type parity with the other implementation.
50 */
51var Propagate;
52(function (Propagate) {
53 Propagate[Propagate["DEADLINE"] = 1] = "DEADLINE";
54 Propagate[Propagate["CENSUS_STATS_CONTEXT"] = 2] = "CENSUS_STATS_CONTEXT";
55 Propagate[Propagate["CENSUS_TRACING_CONTEXT"] = 4] = "CENSUS_TRACING_CONTEXT";
56 Propagate[Propagate["CANCELLATION"] = 8] = "CANCELLATION";
57 // https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/propagation_bits.h#L43
58 Propagate[Propagate["DEFAULTS"] = 65535] = "DEFAULTS";
59})(Propagate = exports.Propagate || (exports.Propagate = {}));
60// -1 means unlimited
61exports.DEFAULT_MAX_SEND_MESSAGE_LENGTH = -1;
62// 4 MB default
63exports.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH = 4 * 1024 * 1024;
64//# sourceMappingURL=constants.js.map
\No newline at end of file