xref: /aosp_15_r20/external/federated-compute/fcp/base/tracing_schema.fbs (revision 14675a029014e728ec732f129a32e299b2da0601)
1// Copyright 2019 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15include "fcp/tracing/tracing_schema_common.fbs";
16
17// Keep in sync with absl status in third_party/absl/status/status.h
18enum TracingStatusCode : short {
19  Ok,
20  Cancelled,
21  Unknown,
22  InvalidArgument,
23  DeadlineExceeded,
24  NotFound,
25  AlreadyExists,
26  PermissionDenied,
27  ResourceExhausted,
28  FailedPrecondition,
29  Aborted,
30  OutOfRange,
31  Unimplemented,
32  Internal,
33  Unavailable,
34  DataLoss,
35  Unauthenticated,
36}
37
38table ResultExpectError (tag: "!EXP", error) {
39  expectation: string;
40  file_name: string;
41  line: int32;
42}
43
44table ResultExpectStatusError (tag: "STAT", error) {
45  // TODO(team): Pull out status fields into status struct.
46  expected_code: TracingStatusCode;
47  actual_code: TracingStatusCode;
48  message: string;
49  file_name: string;
50  line: int32;
51}
52
53table ProtoParseFailure (tag: "PRPR", error) {
54  type: string;
55}
56