Repository: envoyproxy/envoy
File: api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto (Protocol Buffers)

Code before:
    // or not), the request is resumed.
    config.core.v3.ConfigSource odcds_config = 1;

    // xdstp:// resource locator for on-demand cluster collection.
    // [#not-implemented-hide:]
    string resources_locator = 2;

    // The timeout for on-demand cluster lookup. If the CDS cannot return the required cluster,
    // the downstream request will be closed with the error code detail NO_CLUSTER_FOUND.
    // [#not-implemented-hide:]
    google.protobuf.Duration timeout = 3;
  }

  message TcpAccessLogOptions {
    // The interval for flushing access logs. By default, the TCP proxy flushes a single access log when the
    // connection is closed. If this field is set, the TCP proxy flushes access logs periodically at the
    // specified interval.
    // The interval must be at least 1ms.
    google.protobuf.Duration access_log_flush_interval = 1
        [(validate.rules).duration = {gte {nanos: 1000000}}];

    // If set to true, the access log is flushed when the TCP proxy successfully establishes a
    // connection with the upstream. If the connection fails, the access log is not flushed.
    bool flush_access_log_on_connected = 2;

    // If set to true, the access log is flushed when the TCP proxy accepts a connection.
    bool flush_access_log_on_start = 3;
  }

  reserved 6;

  reserved "deprecated_v1";

  // The prefix to use when emitting :ref:`statistics
  // <config_network_filters_tcp_proxy_stats>`.
  string stat_prefix = 1 [(validate.rules).string = {min_len: 1}];

  oneof cluster_specifier {
    option (validate.required) = true;

    // The upstream cluster to connect to.
    string cluster = 2;

    // Multiple upstream clusters can be specified. The request is routed to one of the upstream clusters
    // based on the weights assigned to each cluster.
    WeightedCluster weighted_clusters = 10;
  }

  // The on demand policy for the upstream cluster.
  // It applies to both
  // :ref:`TcpProxy.cluster <envoy_v3_api_field_extensions.filters.network.tcp_proxy.v3.TcpProxy.cluster>`

Review comment (suggestion):
```suggestion
    // If set to ``true``, the access log is flushed when the TCP proxy accepts a connection.
```

Code after:
    // or not), the request is resumed.
    config.core.v3.ConfigSource odcds_config = 1;

    // xdstp:// resource locator for on-demand cluster collection.
    // [#not-implemented-hide:]
    string resources_locator = 2;

    // The timeout for on-demand cluster lookup. If the CDS cannot return the required cluster,
    // the downstream request will be closed with the error code detail NO_CLUSTER_FOUND.
    // [#not-implemented-hide:]
    google.protobuf.Duration timeout = 3;
  }

  message TcpAccessLogOptions {
    // The interval for flushing access logs. By default, the TCP proxy flushes a single access log when the
    // connection is closed. If this field is set, the TCP proxy flushes access logs periodically at the
    // specified interval.
    // The interval must be at least 1ms.
    google.protobuf.Duration access_log_flush_interval = 1
        [(validate.rules).duration = {gte {nanos: 1000000}}];

    // If set to ``true``, the access log is flushed when the TCP proxy successfully establishes a
    // connection with the upstream. If the connection fails, the access log is not flushed.
    bool flush_access_log_on_connected = 2;

    // If set to ``true``, the access log is flushed when the TCP proxy accepts a connection.
    bool flush_access_log_on_start = 3;
  }

  reserved 6;

  reserved "deprecated_v1";

  // The prefix to use when emitting :ref:`statistics
  // <config_network_filters_tcp_proxy_stats>`.
  string stat_prefix = 1 [(validate.rules).string = {min_len: 1}];

  oneof cluster_specifier {
    option (validate.required) = true;

    // The upstream cluster to connect to.
    string cluster = 2;

    // Multiple upstream clusters can be specified. The request is routed to one of the upstream clusters
    // based on the weights assigned to each cluster.
    WeightedCluster weighted_clusters = 10;
  }

  // The on demand policy for the upstream cluster.
  // It applies to both
  // :ref:`TcpProxy.cluster <envoy_v3_api_field_extensions.filters.network.tcp_proxy.v3.TcpProxy.cluster>`