-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlink.proto
136 lines (113 loc) · 4.19 KB
/
link.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// Copyright 2023 Ant Group Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";
package yacl.link;
message PartyProto {
string id = 1;
string host = 2;
}
// SSL options.
message SSLOptionsProto {
// Certificate file path
string certificate_path = 1;
// Private key file path
string private_key_path = 2;
// Set the maximum depth of the certificate chain for verification
// If 0, turn off the verification
int32 verify_depth = 3;
// Set the trusted CA file to verify the peer's certificate
// If empty, use the system default CA files
string ca_file_path = 4;
}
// Retry options.
message RetryOptionsProto {
// max retry count
// default 3
uint32 max_retry = 1;
// time between retries at first retry
// default 1 second
uint32 retry_interval_ms = 2;
// The amount of time to increase the interval between retries
// default 2s
uint32 retry_interval_incr_ms = 3;
// The maximum interval between retries
// default 10s
uint32 max_retry_interval_ms = 4;
// retry on these brpc error codes, if empty, retry on all codes
repeated uint32 error_codes = 5;
// retry on these http codes, if empty, retry on all http codes
repeated uint32 http_codes = 6;
// do aggressive retry, this means that retries will be made on additional
// error codes
bool aggressive_retry = 7;
}
// Configuration for link config.
message ContextDescProto {
// the UUID of this communication.
// optional
string id = 1;
// party description, describes the world.
repeated PartyProto parties = 2;
// connect to mesh retry time.
uint32 connect_retry_times = 3;
// connect to mesh retry interval.
uint32 connect_retry_interval_ms = 4;
// recv timeout in milliseconds.
//
// 'recv time' is the max time that a party will wait for a given event.
// for example:
//
// begin recv end recv
// |--------|-------recv-time----------|------------------| alice's timeline
//
// begin send end send
// |-----busy-work-------------|-------------|------------| bob's timeline
//
// in above case, when alice begins recv for a specific event, bob is still
// busy doing its job, when alice's wait time exceed wait_timeout_ms, it raise
// exception, although bob now is starting to send data.
//
// so for long time work(that one party may wait for the others for very long
// time), this value should be changed accordingly.
uint64 recv_timeout_ms = 5;
// http max payload size, if a single http request size is greater than this
// limit, it will be unpacked into small chunks then reassembled.
//
// This field does affect performance. Please choose wisely.
uint32 http_max_payload_size = 6;
// a single http request timetout.
uint32 http_timeout_ms = 7;
// throttle window size for channel. if there are more than limited size
// messages are flying, `SendAsync` will block until messages are processed or
// throw exception after wait for `recv_timeout_ms`
uint32 throttle_window_size = 8;
// BRPC client channel protocol.
string brpc_channel_protocol = 9;
// BRPC client channel connection type.
string brpc_channel_connection_type = 10;
// ssl options for link channel.
bool enable_ssl = 11;
// ssl configs for channel
// this config is ignored if enable_ssl == false;
SSLOptionsProto client_ssl_opts = 12;
// ssl configs for service
// this config is ignored if enable_ssl == false;
SSLOptionsProto server_ssl_opts = 13;
// chunk parallel send size for channel. if need chunked send when send
// message, the max paralleled send size is chunk_parallel_send_size
uint32 chunk_parallel_send_size = 17;
// retry options
RetryOptionsProto retry_opts = 14;
}