Skip to content

Commit 97c3048

Browse files
qiwzhangkyessenov
authored andcommitted
Separate http client config with tcp. (#231)
* Separate http client config with tcp. * update per comment * add quota spec for tcp * rename to connection_quota_spec
1 parent 7d467f3 commit 97c3048

File tree

1 file changed

+34
-11
lines changed

1 file changed

+34
-11
lines changed

mixer/v1/config/client/mixer_filter_config.proto renamed to mixer/v1/config/client/client_config.proto

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ option (gogoproto.goproto_getters_all) = false;
2626
option (gogoproto.equal_all) = false;
2727
option (gogoproto.gostring_all) = false;
2828

29-
// Defines the per-service mixerclient control configuration.
30-
message MixerControlConfig {
29+
// Defines the per-service client configuration.
30+
message ServiceConfig {
3131
// If true, call Mixer Check.
3232
bool enable_mixer_check = 1;
3333

@@ -45,9 +45,8 @@ message MixerControlConfig {
4545
repeated QuotaSpec quota_spec = 5;
4646
}
4747

48-
// Defines the Mixerclient's envoy HTTP filter and TCP filter
49-
// configuration.
50-
message MixerFilterConfig {
48+
// Defines the transport config on how to call Mixer.
49+
message TransportConfig {
5150
// The flag to disable check cache.
5251
bool disable_check_cache = 1;
5352

@@ -65,25 +64,49 @@ message MixerFilterConfig {
6564
}
6665
// Specifies the policy when failed to connect to Mixer server.
6766
NetworkFailPolicy network_fail_policy = 4;
67+
}
68+
69+
// Defines the client config for HTTP.
70+
message HttpClientConfig {
71+
// The transport config.
72+
TransportConfig transport = 1;
6873

6974
// Map of control configuration indexed by destination.service. This
7075
// is used to support per-service configuration for cases where a
7176
// mixerclient serves multiple services.
72-
map<string, MixerControlConfig> control_configs = 5;
77+
map<string, ServiceConfig> service_configs = 2;
7378

7479
// Default destination service name if none was specified in the
7580
// client request.
76-
string default_destination_service = 6;
81+
string default_destination_service = 3;
7782

7883
// Default attributes to send to Mixer in both Check and
7984
// Report. This typically includes "destination.ip" and
8085
// "destination.uid" attributes.
81-
Attributes mixer_attributes = 7;
86+
Attributes mixer_attributes = 4;
8287

8388
// Default attributes to forward to upstream. This typically
8489
// includes the "source.ip" and "source.uid" attributes.
85-
Attributes forward_attributes = 8;
90+
Attributes forward_attributes = 5;
91+
}
8692

87-
// If set to true, disables mixer check calls for TCP connections
88-
bool disable_tcp_check_calls = 9;
93+
// Defines the client config for TCP.
94+
message TcpClientConfig {
95+
// The transport config.
96+
TransportConfig transport = 1;
97+
98+
// Default attributes to send to Mixer in both Check and
99+
// Report. This typically includes "destination.ip" and
100+
// "destination.uid" attributes.
101+
Attributes mixer_attributes = 2;
102+
103+
// If set to true, disables mixer check calls.
104+
bool disable_check_calls = 3;
105+
106+
// If set to true, disables mixer check calls.
107+
bool disable_report_calls = 4;
108+
109+
// Quota specifications to generate quota requirements.
110+
// It applies on the new TCP connections.
111+
QuotaSpec connection_quota_spec = 5;
89112
}

0 commit comments

Comments
 (0)