api: add listener_address_restriction_hint in Node to hint known listening ports on the node (#10370)
Signed-off-by: Sanjay Pujare <sanjaypujare@users.noreply.github.com> Mirrored from https://github.com/envoyproxy/envoy @ 404d73c73c08b8d470b3ead6395cbc9c531f199dmaster-ci-test
parent
e7e242bc57
commit
34df5d2db4
10 changed files with 132 additions and 86 deletions
@ -0,0 +1,53 @@ |
|||||||
|
syntax = "proto3"; |
||||||
|
|
||||||
|
package envoy.api.v2.core; |
||||||
|
|
||||||
|
import "udpa/annotations/migrate.proto"; |
||||||
|
import "validate/validate.proto"; |
||||||
|
|
||||||
|
option java_package = "io.envoyproxy.envoy.api.v2.core"; |
||||||
|
option java_outer_classname = "SocketOptionProto"; |
||||||
|
option java_multiple_files = true; |
||||||
|
option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; |
||||||
|
|
||||||
|
// [#protodoc-title: Socket Option ] |
||||||
|
|
||||||
|
// Generic socket option message. This would be used to set socket options that |
||||||
|
// might not exist in upstream kernels or precompiled Envoy binaries. |
||||||
|
// [#next-free-field: 7] |
||||||
|
message SocketOption { |
||||||
|
enum SocketState { |
||||||
|
// Socket options are applied after socket creation but before binding the socket to a port |
||||||
|
STATE_PREBIND = 0; |
||||||
|
|
||||||
|
// Socket options are applied after binding the socket to a port but before calling listen() |
||||||
|
STATE_BOUND = 1; |
||||||
|
|
||||||
|
// Socket options are applied after calling listen() |
||||||
|
STATE_LISTENING = 2; |
||||||
|
} |
||||||
|
|
||||||
|
// An optional name to give this socket option for debugging, etc. |
||||||
|
// Uniqueness is not required and no special meaning is assumed. |
||||||
|
string description = 1; |
||||||
|
|
||||||
|
// Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP |
||||||
|
int64 level = 2; |
||||||
|
|
||||||
|
// The numeric name as passed to setsockopt |
||||||
|
int64 name = 3; |
||||||
|
|
||||||
|
oneof value { |
||||||
|
option (validate.required) = true; |
||||||
|
|
||||||
|
// Because many sockopts take an int value. |
||||||
|
int64 int_value = 4; |
||||||
|
|
||||||
|
// Otherwise it's a byte buffer. |
||||||
|
bytes buf_value = 5; |
||||||
|
} |
||||||
|
|
||||||
|
// The state in which the option will be applied. When used in BindConfig |
||||||
|
// STATE_PREBIND is currently the only valid value. |
||||||
|
SocketState state = 6 [(validate.rules).enum = {defined_only: true}]; |
||||||
|
} |
@ -0,0 +1,55 @@ |
|||||||
|
syntax = "proto3"; |
||||||
|
|
||||||
|
package envoy.config.core.v3; |
||||||
|
|
||||||
|
import "udpa/annotations/versioning.proto"; |
||||||
|
|
||||||
|
import "validate/validate.proto"; |
||||||
|
|
||||||
|
option java_package = "io.envoyproxy.envoy.config.core.v3"; |
||||||
|
option java_outer_classname = "SocketOptionProto"; |
||||||
|
option java_multiple_files = true; |
||||||
|
|
||||||
|
// [#protodoc-title: Socket Option ] |
||||||
|
|
||||||
|
// Generic socket option message. This would be used to set socket options that |
||||||
|
// might not exist in upstream kernels or precompiled Envoy binaries. |
||||||
|
// [#next-free-field: 7] |
||||||
|
message SocketOption { |
||||||
|
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.SocketOption"; |
||||||
|
|
||||||
|
enum SocketState { |
||||||
|
// Socket options are applied after socket creation but before binding the socket to a port |
||||||
|
STATE_PREBIND = 0; |
||||||
|
|
||||||
|
// Socket options are applied after binding the socket to a port but before calling listen() |
||||||
|
STATE_BOUND = 1; |
||||||
|
|
||||||
|
// Socket options are applied after calling listen() |
||||||
|
STATE_LISTENING = 2; |
||||||
|
} |
||||||
|
|
||||||
|
// An optional name to give this socket option for debugging, etc. |
||||||
|
// Uniqueness is not required and no special meaning is assumed. |
||||||
|
string description = 1; |
||||||
|
|
||||||
|
// Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP |
||||||
|
int64 level = 2; |
||||||
|
|
||||||
|
// The numeric name as passed to setsockopt |
||||||
|
int64 name = 3; |
||||||
|
|
||||||
|
oneof value { |
||||||
|
option (validate.required) = true; |
||||||
|
|
||||||
|
// Because many sockopts take an int value. |
||||||
|
int64 int_value = 4; |
||||||
|
|
||||||
|
// Otherwise it's a byte buffer. |
||||||
|
bytes buf_value = 5; |
||||||
|
} |
||||||
|
|
||||||
|
// The state in which the option will be applied. When used in BindConfig |
||||||
|
// STATE_PREBIND is currently the only valid value. |
||||||
|
SocketState state = 6 [(validate.rules).enum = {defined_only: true}]; |
||||||
|
} |
Loading…
Reference in new issue