lds: Add HTTP API listener. (#8170)

Signed-off-by: Mark D. Roth <roth@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 081b0b97dd7b3d417005182b012bf31974cd0877
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent 619157fd6f
commit 06156e3b63
  1. 2
      envoy/api/v2/BUILD
  2. 16
      envoy/api/v2/lds.proto
  3. 18
      envoy/config/listener/v2/BUILD
  4. 24
      envoy/config/listener/v2/api_listener.proto

@ -27,6 +27,7 @@ api_proto_package(
"//envoy/api/v2/listener:pkg",
"//envoy/api/v2/ratelimit:pkg",
"//envoy/api/v2/route:pkg",
"//envoy/config/listener/v2:pkg",
"//envoy/type",
],
)
@ -87,6 +88,7 @@ api_proto_library_internal(
"//envoy/api/v2/core:base",
"//envoy/api/v2/listener",
"//envoy/api/v2/listener:udp_listener_config",
"//envoy/config/listener/v2:api_listener",
],
)

@ -13,6 +13,7 @@ import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/discovery.proto";
import "envoy/api/v2/listener/listener.proto";
import "envoy/api/v2/listener/udp_listener_config.proto";
import "envoy/config/listener/v2/api_listener.proto";
import "google/api/annotations.proto";
import "google/protobuf/duration.proto";
@ -42,7 +43,7 @@ service ListenerDiscoveryService {
}
}
// [#comment:next free field: 19]
// [#comment:next free field: 20]
message Listener {
// The unique name by which this listener is known. If no name is provided,
// Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically
@ -200,4 +201,17 @@ message Listener {
// <envoy_api_field_listener.UdpListenerConfig.udp_listener_name>` = "raw_udp_listener" for
// creating a packet-oriented UDP listener. If not present, treat it as "raw_udp_listener".
listener.UdpListenerConfig udp_listener_config = 18;
// [#not-implemented-hide:]
// Used to represent an API listener, which is used in non-proxy clients. The type of API
// exposed to the non-proxy application depends on the type of API listener.
// When this field is set, no other field except for :ref:`name<envoy_api_field_Listener.name>`
// should be set.
// [#next-major-version: In the v3 API, instead of this messy approach where the socket
// listener fields are directly in the top-level Listener message and the API listener types
// are in the ApiListener message, the socket listener messages should be in their own message,
// and the top-level Listener should essentially be a oneof that selects between the
// socket listener and the various types of API listener. That way, a given Listener message
// can structurally only contain the fields of the relevant type.]
envoy.config.listener.v2.ApiListener api_listener = 19;
}

@ -0,0 +1,18 @@
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package")
licenses(["notice"]) # Apache 2
package_group(
name = "friends",
packages = [
"//envoy/api/v2",
],
)
api_proto_package()
api_proto_library_internal(
name = "api_listener",
srcs = ["api_listener.proto"],
visibility = [":friends"],
)

@ -0,0 +1,24 @@
syntax = "proto3";
package envoy.config.listener.v2;
option java_outer_classname = "ApiListenerProto";
option java_multiple_files = true;
option java_package = "io.envoyproxy.envoy.config.listener.v2";
import "google/protobuf/any.proto";
// [#not-implemented-hide:]
// Describes a type of API listener, which is used in non-proxy clients. The type of API
// exposed to the non-proxy application depends on the type of API listener.
message ApiListener {
// The type in this field determines the type of API listener. At present, the following
// types are supported:
// envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager (HTTP)
// [#next-major-version: In the v3 API, replace this Any field with a oneof containing the
// specific config message for each type of API listener. We could not do this in v2 because
// it would have caused circular dependencies for go protos: lds.proto depends on this file,
// and http_connection_manager.proto depends on rds.proto, which is in the same directory as
// lds.proto, so lds.proto cannot depend on this file.]
google.protobuf.Any api_listener = 1;
}
Loading…
Cancel
Save