Debian Codegraph @

test/core/end2end/fuzzers/api_fuzzer.proto

raw
1 // Copyright 2021 gRPC authors.
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
15 syntax = "proto3";
16
17 package api_fuzzer;
18
19 import "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto";
20
21 message Empty {}
22
23 message ByteSlice {
24 reserved 2;
25 reserved "intern";
26 bytes value = 1;
27 }
28
29 message StringSlice {
30 reserved 2;
31 reserved "intern";
32 string value = 1;
33 }
34
35 message ResourceQuota {}
36
37 message ChannelArg {
38 string key = 1;
39 oneof value {
40 string str = 2;
41 int64 i = 3;
42 ResourceQuota resource_quota = 4;
43 }
44 }
45
46 message CredArtifact {
47 oneof type {
48 string custom = 1;
49 int32 builtin = 2;
50 }
51 }
52
53 message SslChannelCreds {
54 CredArtifact root_certs = 1;
55 CredArtifact private_key = 2;
56 CredArtifact certs = 3;
57 }
58
59 message CompositeCallCreds {
60 repeated CallCreds call_creds = 1;
61 }
62
63 message IAM {
64 string auth_token = 1;
65 string auth_selector = 2;
66 }
67
68 message CallCreds {
69 oneof type {
70 CompositeCallCreds composite_call_creds = 1;
71 string access_token = 2;
72 IAM iam = 3;
73 Empty null = 4;
74 }
75 }
76
77 message CompositeChannelCreds {
78 ChannelCreds channel_creds = 1;
79 CallCreds call_creds = 2;
80 }
81
82 message ChannelCreds {
83 oneof type {
84 SslChannelCreds ssl_channel_creds = 1;
85 CompositeChannelCreds composite_channel_creds = 2;
86 Empty null = 3;
87 }
88 }
89
90 message Metadatum {
91 StringSlice key = 1;
92 ByteSlice value = 2;
93 }
94
95 message ChannelAction {
96 uint64 add_n_bytes_writable = 1;
97 uint64 add_n_bytes_readable = 2;
98 uint64 wait_ms = 3;
99 }
100
101 message CreateChannel {
102 string target = 1;
103 repeated ChannelArg channel_args = 2;
104 ChannelCreds channel_creds = 3;
105 repeated ChannelAction channel_actions = 4;
106 }
107
108 message CreateServer {
109 repeated ChannelArg channel_args = 1;
110 }
111
112 message CreateCall {
113 uint32 propagation_mask = 1;
114 StringSlice method = 2;
115 StringSlice host = 3;
116 int32 timeout = 4;
117 }
118
119 message SendInitialMetadata {
120 repeated Metadatum metadata = 1;
121 }
122
123 message SendMessage {
124 repeated ByteSlice message = 1;
125 }
126
127 message SendCloseFromClient {
128 }
129
130 message SendStatusFromServer {
131 repeated Metadatum metadata = 1;
132 uint32 status_code = 2;
133 ByteSlice status_details = 3;
134 }
135
136 message ReceiveInitialMetadata {
137 }
138
139 message ReceiveMessage {
140 }
141
142 message ReceiveStatusOnClient {
143 }
144
145 message ReceiveCloseOnServer {
146 }
147
148 message BatchOp {
149 oneof op {
150 SendInitialMetadata send_initial_metadata = 1;
151 SendMessage send_message = 2;
152 SendCloseFromClient send_close_from_client = 3;
153 SendStatusFromServer send_status_from_server = 4;
154 ReceiveInitialMetadata receive_initial_metadata = 5;
155 ReceiveMessage receive_message = 6;
156 ReceiveStatusOnClient receive_status_on_client = 7;
157 ReceiveCloseOnServer receive_close_on_server = 8;
158 }
159 uint32 flags = 100;
160 }
161
162 message Batch {
163 repeated BatchOp operations = 1;
164 }
165
166 message Action {
167 reserved 2;
168 oneof type {
169 Empty poll_cq = 1;
170 CreateChannel create_channel = 3;
171 Empty close_channel = 4;
172 CreateServer create_server = 5;
173 Empty shutdown_server = 6;
174 Empty cancel_all_calls_if_shutdown = 7;
175 Empty destroy_server_if_ready = 8;
176 bool check_connectivity = 9;
177 uint32 watch_connectivity = 10;
178 CreateCall create_call = 11;
179 Empty change_active_call = 12;
180 Batch queue_batch = 13;
181 Empty cancel_call = 14;
182 Empty get_peer = 15;
183 Empty get_target = 16;
184 Empty ping = 17;
185 string enable_tracer = 18;
186 string disable_tracer = 19;
187 Empty request_call = 20;
188 Empty destroy_call = 21;
189 uint32 resize_resource_quota = 22;
190 }
191 }
192
193 message Msg {
194 repeated Action actions = 1;
195 fuzzing_event_engine.Actions event_engine_actions = 2;
196 }