cuelang.org/go@v0.10.1/encoding/protobuf/testdata/istio.io/api/mixer/v1/config/client/client_config.proto (about)

     1  // Copyright 2017 Istio 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  import "gogoproto/gogo.proto";
    18  import "google/protobuf/duration.proto";
    19  
    20  import "mixer/v1/attributes.proto";
    21  import "mixer/v1/config/client/api_spec.proto";
    22  import "mixer/v1/config/client/quota.proto";
    23  
    24  // $title: Mixer Client
    25  // $description: Configuration state for the Mixer client library.
    26  // $location: https://istio.io/docs/reference/config/policy-and-telemetry/istio.mixer.v1.config.client
    27  
    28  // Describes the configuration state for the Mixer client library that's built into Envoy.
    29  package istio.mixer.v1.config.client;
    30  
    31  option go_package = "istio.io/api/mixer/v1/config/client";
    32  
    33  option (gogoproto.goproto_getters_all) = false;
    34  option (gogoproto.equal_all) = false;
    35  option (gogoproto.gostring_all) = false;
    36  option (gogoproto.stable_marshaler_all) = true;
    37  
    38  // Specifies the behavior when the client is unable to connect to Mixer.
    39  message NetworkFailPolicy {
    40  
    41    // Example of single-value enum.
    42    enum FailPolicy {
    43      // If network connection fails, request is allowed and delivered to the
    44      // service.
    45      FAIL_OPEN = 0;
    46    }
    47  
    48    // Specifies the behavior when the client is unable to connect to Mixer.
    49    FailPolicy policy = 1;
    50  
    51    // Max retries on transport error.
    52    uint32 max_retry = 2;
    53  
    54    // Base time to wait between retries.  Will be adjusted by exponential
    55    // backoff and jitter.
    56    google.protobuf.Duration base_retry_wait = 3;
    57  
    58    // Max time to wait between retries.
    59    google.protobuf.Duration max_retry_wait = 4;
    60  }
    61  
    62  // Defines the per-service client configuration.
    63  message ServiceConfig {
    64    // If true, do not call Mixer Check.
    65    bool disable_check_calls = 1;
    66  
    67    // If true, do not call Mixer Report.
    68    bool disable_report_calls = 2;
    69  
    70    // Send these attributes to Mixer in both Check and Report. This
    71    // typically includes the "destination.service" attribute.
    72    // In case of a per-route override, per-route attributes take precedence
    73    // over the attributes supplied in the client configuration.
    74    Attributes mixer_attributes = 3;
    75  
    76    // HTTP API specifications to generate API attributes.
    77    repeated HTTPAPISpec http_api_spec = 4;
    78  
    79    // Quota specifications to generate quota requirements.
    80    repeated QuotaSpec quota_spec = 5;
    81  
    82    // Specifies the behavior when the client is unable to connect to Mixer.
    83    // This is the service-level policy. It overrides
    84    // [mesh-level
    85    // policy][istio.mixer.v1.config.client.TransportConfig.network_fail_policy].
    86    NetworkFailPolicy network_fail_policy = 7;
    87  
    88    // Default attributes to forward to upstream. This typically
    89    // includes the "source.ip" and "source.uid" attributes.
    90    // In case of a per-route override, per-route attributes take precedence
    91    // over the attributes supplied in the client configuration.
    92    //
    93    // Forwarded attributes take precedence over the static Mixer attributes.
    94    // The full order of application is as follows:
    95    // 1. static Mixer attributes from the filter config;
    96    // 2. static Mixer attributes from the route config;
    97    // 3. forwarded attributes from the source filter config (if any);
    98    // 4. forwarded attributes from the source route config (if any);
    99    // 5. derived attributes from the request metadata.
   100    Attributes forward_attributes = 8;
   101  }
   102  
   103  // Defines the transport config on how to call Mixer.
   104  message TransportConfig {
   105    // The flag to disable check cache.
   106    bool disable_check_cache = 1;
   107  
   108    // The flag to disable quota cache.
   109    bool disable_quota_cache = 2;
   110  
   111    // The flag to disable report batch.
   112    bool disable_report_batch = 3;
   113  
   114    // Specifies the behavior when the client is unable to connect to Mixer.
   115    // This is the mesh level policy. The default value for policy is FAIL_OPEN.
   116    NetworkFailPolicy network_fail_policy = 4;
   117  
   118    // Specify refresh interval to write Mixer client statistics to Envoy share
   119    // memory. If not specified, the interval is 10 seconds.
   120    google.protobuf.Duration stats_update_interval = 5;
   121  
   122    // Name of the cluster that will forward check calls to a pool of mixer
   123    // servers. Defaults to "mixer_server". By using different names for
   124    // checkCluster and reportCluster, it is possible to have one set of
   125    // Mixer servers handle check calls, while another set of Mixer servers
   126    // handle report calls.
   127    //
   128    // NOTE: Any value other than the default "mixer_server" will require the
   129    // Istio Grafana dashboards to be reconfigured to use the new name.
   130    string check_cluster = 6;
   131  
   132    // Name of the cluster that will forward report calls to a pool of mixer
   133    // servers. Defaults to "mixer_server". By using different names for
   134    // checkCluster and reportCluster, it is possible to have one set of
   135    // Mixer servers handle check calls, while another set of Mixer servers
   136    // handle report calls.
   137    //
   138    // NOTE: Any value other than the default "mixer_server" will require the
   139    // Istio Grafana dashboards to be reconfigured to use the new name.
   140    string report_cluster = 7;
   141  
   142    // Default attributes to forward to Mixer upstream. This typically
   143    // includes the "source.ip" and "source.uid" attributes. These
   144    // attributes are consumed by the proxy in front of mixer.
   145    Attributes attributes_for_mixer_proxy = 8;
   146  }
   147  
   148  // Defines the client config for HTTP.
   149  message HttpClientConfig {
   150    // The transport config.
   151    TransportConfig transport = 1;
   152  
   153    // Map of control configuration indexed by destination.service. This
   154    // is used to support per-service configuration for cases where a
   155    // mixerclient serves multiple services.
   156    map<string, ServiceConfig> service_configs = 2;
   157  
   158    // Default destination service name if none was specified in the
   159    // client request.
   160    string default_destination_service = 3;
   161  
   162    // Default attributes to send to Mixer in both Check and
   163    // Report. This typically includes "destination.ip" and
   164    // "destination.uid" attributes.
   165    Attributes mixer_attributes = 4;
   166  
   167    // Default attributes to forward to upstream. This typically
   168    // includes the "source.ip" and "source.uid" attributes.
   169    Attributes forward_attributes = 5;
   170  }
   171  
   172  // Defines the client config for TCP.
   173  message TcpClientConfig {
   174    // The transport config.
   175    TransportConfig transport = 1;
   176  
   177    // Default attributes to send to Mixer in both Check and
   178    // Report. This typically includes "destination.ip" and
   179    // "destination.uid" attributes.
   180    Attributes mixer_attributes = 2;
   181  
   182    // If set to true, disables Mixer check calls.
   183    bool disable_check_calls = 3;
   184  
   185    // If set to true, disables Mixer check calls.
   186    bool disable_report_calls = 4;
   187  
   188    // Quota specifications to generate quota requirements.
   189    // It applies on the new TCP connections.
   190    QuotaSpec connection_quota_spec = 5;
   191  
   192    // Specify report interval to send periodical reports for long TCP
   193    // connections. If not specified, the interval is 10 seconds. This interval
   194    // should not be less than 1 second, otherwise it will be reset to 1 second.
   195    google.protobuf.Duration report_interval = 6;
   196  }