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