1 | ;
|
2 | /**
|
3 | * Copyright 2018, OpenCensus 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 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | /** An enumeration of canonical status codes. */
|
19 | var CanonicalCode;
|
20 | (function (CanonicalCode) {
|
21 | /**
|
22 | * Not an error; returned on success
|
23 | */
|
24 | CanonicalCode[CanonicalCode["OK"] = 0] = "OK";
|
25 | /**
|
26 | * The operation was cancelled (typically by the caller).
|
27 | */
|
28 | CanonicalCode[CanonicalCode["CANCELLED"] = 1] = "CANCELLED";
|
29 | /**
|
30 | * Unknown error. An example of where this error may be returned is
|
31 | * if a status value received from another address space belongs to
|
32 | * an error-space that is not known in this address space. Also
|
33 | * errors raised by APIs that do not return enough error information
|
34 | * may be converted to this error.
|
35 | */
|
36 | CanonicalCode[CanonicalCode["UNKNOWN"] = 2] = "UNKNOWN";
|
37 | /**
|
38 | * Client specified an invalid argument. Note that this differs
|
39 | * from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments
|
40 | * that are problematic regardless of the state of the system
|
41 | * (e.g., a malformed file name).
|
42 | */
|
43 | CanonicalCode[CanonicalCode["INVALID_ARGUMENT"] = 3] = "INVALID_ARGUMENT";
|
44 | /**
|
45 | * Deadline expired before operation could complete. For operations
|
46 | * that change the state of the system, this error may be returned
|
47 | * even if the operation has completed successfully. For example, a
|
48 | * successful response from a server could have been delayed long
|
49 | * enough for the deadline to expire.
|
50 | */
|
51 | CanonicalCode[CanonicalCode["DEADLINE_EXCEEDED"] = 4] = "DEADLINE_EXCEEDED";
|
52 | /**
|
53 | * Some requested entity (e.g., file or directory) was not found.
|
54 | */
|
55 | CanonicalCode[CanonicalCode["NOT_FOUND"] = 5] = "NOT_FOUND";
|
56 | /**
|
57 | * Some entity that we attempted to create (e.g., file or directory)
|
58 | * already exists.
|
59 | */
|
60 | CanonicalCode[CanonicalCode["ALREADY_EXISTS"] = 6] = "ALREADY_EXISTS";
|
61 | /**
|
62 | * The caller does not have permission to execute the specified
|
63 | * operation. PERMISSION_DENIED must not be used for rejections
|
64 | * caused by exhausting some resource (use RESOURCE_EXHAUSTED
|
65 | * instead for those errors). PERMISSION_DENIED must not be
|
66 | * used if the caller can not be identified (use UNAUTHENTICATED
|
67 | * instead for those errors).
|
68 | */
|
69 | CanonicalCode[CanonicalCode["PERMISSION_DENIED"] = 7] = "PERMISSION_DENIED";
|
70 | /**
|
71 | * Some resource has been exhausted, perhaps a per-user quota, or
|
72 | * perhaps the entire file system is out of space.
|
73 | */
|
74 | CanonicalCode[CanonicalCode["RESOURCE_EXHAUSTED"] = 8] = "RESOURCE_EXHAUSTED";
|
75 | /**
|
76 | * Operation was rejected because the system is not in a state
|
77 | * required for the operation's execution. For example, directory
|
78 | * to be deleted may be non-empty, an rmdir operation is applied to
|
79 | * a non-directory, etc.
|
80 | *
|
81 | * A litmus test that may help a service implementor in deciding
|
82 | * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
|
83 | *
|
84 | * - Use UNAVAILABLE if the client can retry just the failing call.
|
85 | * - Use ABORTED if the client should retry at a higher-level
|
86 | * (e.g., restarting a read-modify-write sequence).
|
87 | * - Use FAILED_PRECONDITION if the client should not retry until
|
88 | * the system state has been explicitly fixed. E.g., if an "rmdir"
|
89 | * fails because the directory is non-empty, FAILED_PRECONDITION
|
90 | * should be returned since the client should not retry unless
|
91 | * they have first fixed up the directory by deleting files from it.
|
92 | * - Use FAILED_PRECONDITION if the client performs conditional
|
93 | * REST Get/Update/Delete on a resource and the resource on the
|
94 | * server does not match the condition. E.g., conflicting
|
95 | * read-modify-write on the same resource.
|
96 | */
|
97 | CanonicalCode[CanonicalCode["FAILED_PRECONDITION"] = 9] = "FAILED_PRECONDITION";
|
98 | /**
|
99 | * The operation was aborted, typically due to a concurrency issue
|
100 | * like sequencer check failures, transaction aborts, etc.
|
101 | *
|
102 | * See litmus test above for deciding between FAILED_PRECONDITION,
|
103 | * ABORTED, and UNAVAILABLE.
|
104 | */
|
105 | CanonicalCode[CanonicalCode["ABORTED"] = 10] = "ABORTED";
|
106 | /**
|
107 | * Operation was attempted past the valid range. E.g., seeking or
|
108 | * reading past end of file.
|
109 | *
|
110 | * Unlike INVALID_ARGUMENT, this error indicates a problem that may
|
111 | * be fixed if the system state changes. For example, a 32-bit file
|
112 | * system will generate INVALID_ARGUMENT if asked to read at an
|
113 | * offset that is not in the range [0,2^32-1], but it will generate
|
114 | * OUT_OF_RANGE if asked to read from an offset past the current
|
115 | * file size.
|
116 | *
|
117 | * There is a fair bit of overlap between FAILED_PRECONDITION and
|
118 | * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific
|
119 | * error) when it applies so that callers who are iterating through
|
120 | * a space can easily look for an OUT_OF_RANGE error to detect when
|
121 | * they are done.
|
122 | */
|
123 | CanonicalCode[CanonicalCode["OUT_OF_RANGE"] = 11] = "OUT_OF_RANGE";
|
124 | /**
|
125 | * Operation is not implemented or not supported/enabled in this service.
|
126 | */
|
127 | CanonicalCode[CanonicalCode["UNIMPLEMENTED"] = 12] = "UNIMPLEMENTED";
|
128 | /**
|
129 | * Internal errors. Means some invariants expected by underlying
|
130 | * system has been broken. If you see one of these errors,
|
131 | * something is very broken.
|
132 | */
|
133 | CanonicalCode[CanonicalCode["INTERNAL"] = 13] = "INTERNAL";
|
134 | /**
|
135 | * The service is currently unavailable. This is a most likely a
|
136 | * transient condition and may be corrected by retrying with
|
137 | * a backoff.
|
138 | *
|
139 | * See litmus test above for deciding between FAILED_PRECONDITION,
|
140 | * ABORTED, and UNAVAILABLE.
|
141 | */
|
142 | CanonicalCode[CanonicalCode["UNAVAILABLE"] = 14] = "UNAVAILABLE";
|
143 | /**
|
144 | * Unrecoverable data loss or corruption.
|
145 | */
|
146 | CanonicalCode[CanonicalCode["DATA_LOSS"] = 15] = "DATA_LOSS";
|
147 | /**
|
148 | * The request does not have valid authentication credentials for the
|
149 | * operation.
|
150 | */
|
151 | CanonicalCode[CanonicalCode["UNAUTHENTICATED"] = 16] = "UNAUTHENTICATED";
|
152 | })(CanonicalCode = exports.CanonicalCode || (exports.CanonicalCode = {}));
|
153 | /** An event describing a message sent/received between Spans. */
|
154 | var MessageEventType;
|
155 | (function (MessageEventType) {
|
156 | /** Unknown event type. */
|
157 | MessageEventType[MessageEventType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
158 | /** Indicates a sent message. */
|
159 | MessageEventType[MessageEventType["SENT"] = 1] = "SENT";
|
160 | /** Indicates a received message. */
|
161 | MessageEventType[MessageEventType["RECEIVED"] = 2] = "RECEIVED";
|
162 | })(MessageEventType = exports.MessageEventType || (exports.MessageEventType = {}));
|
163 | /**
|
164 | * Type of span. Can be used to specify additional relationships between spans
|
165 | * in addition to a parent/child relationship.
|
166 | */
|
167 | var SpanKind;
|
168 | (function (SpanKind) {
|
169 | /** Unspecified */
|
170 | SpanKind[SpanKind["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
171 | /**
|
172 | * Indicates that the span covers server-side handling of an RPC or other
|
173 | * remote network request.
|
174 | */
|
175 | SpanKind[SpanKind["SERVER"] = 1] = "SERVER";
|
176 | /**
|
177 | * Indicates that the span covers the client-side wrapper around an RPC or
|
178 | * other remote request.
|
179 | */
|
180 | SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT";
|
181 | })(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
|
182 | /**
|
183 | * Type of link. The relationship of the current span relative to the linked
|
184 | * span.
|
185 | */
|
186 | var LinkType;
|
187 | (function (LinkType) {
|
188 | /**
|
189 | * The relationship of the two spans is unknown, or known but other
|
190 | * than parent-child.
|
191 | */
|
192 | LinkType[LinkType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
193 | /** The linked span is a child of the current span. */
|
194 | LinkType[LinkType["CHILD_LINKED_SPAN"] = 1] = "CHILD_LINKED_SPAN";
|
195 | /** The linked span is a parent of the current span. */
|
196 | LinkType[LinkType["PARENT_LINKED_SPAN"] = 2] = "PARENT_LINKED_SPAN";
|
197 | })(LinkType = exports.LinkType || (exports.LinkType = {}));
|
198 | //# sourceMappingURL=types.js.map |
\ | No newline at end of file |