Documentation ¶
Index ¶
- Variables
- func RegisterAggregatedDiscoveryServiceServer(s *grpc.Server, srv AggregatedDiscoveryServiceServer)
- type AggregatedDiscoveryServiceClient
- type AggregatedDiscoveryServiceServer
- type AggregatedDiscoveryService_StreamAggregatedResourcesClient
- type AggregatedDiscoveryService_StreamAggregatedResourcesServer
- type Any
- type Connection
- type GrpcService
- type Node
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetErrorDetail() *Status
- func (x *Request) GetNode() *Node
- func (x *Request) GetResourceNames() []string
- func (x *Request) GetResources() []*Any
- func (x *Request) GetResponseNonce() string
- func (x *Request) GetTypeUrl() string
- func (x *Request) GetVersionInfo() string
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetCanary() bool
- func (x *Response) GetNonce() string
- func (x *Response) GetResources() []*Any
- func (x *Response) GetTypeUrl() string
- func (x *Response) GetVersionInfo() string
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type Status
- func (*Status) Descriptor() ([]byte, []int)deprecated
- func (x *Status) GetCode() int32
- func (x *Status) GetDetails() []*Any
- func (x *Status) GetMessage() string
- func (*Status) ProtoMessage()
- func (x *Status) ProtoReflect() protoreflect.Message
- func (x *Status) Reset()
- func (x *Status) String() string
- type UnimplementedAggregatedDiscoveryServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_xds_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAggregatedDiscoveryServiceServer ¶
func RegisterAggregatedDiscoveryServiceServer(s *grpc.Server, srv AggregatedDiscoveryServiceServer)
Types ¶
type AggregatedDiscoveryServiceClient ¶
type AggregatedDiscoveryServiceClient interface {
StreamAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_StreamAggregatedResourcesClient, error)
}
AggregatedDiscoveryServiceClient is the client API for AggregatedDiscoveryService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func Connect ¶
func Connect(addr string, clientPem string) (*grpc.ClientConn, AggregatedDiscoveryServiceClient, error)
func NewAggregatedDiscoveryServiceClient ¶
func NewAggregatedDiscoveryServiceClient(cc grpc.ClientConnInterface) AggregatedDiscoveryServiceClient
type AggregatedDiscoveryServiceServer ¶
type AggregatedDiscoveryServiceServer interface { StreamAggregatedResources(AggregatedDiscoveryService_StreamAggregatedResourcesServer) error // contains filtered or unexported methods }
AggregatedDiscoveryServiceServer is the server API for AggregatedDiscoveryService service. All implementations must embed UnimplementedAggregatedDiscoveryServiceServer for forward compatibility
type Any ¶
type Any struct { TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
Copied to avoid dependency. type_url format: prefix/message.type
func (*Any) Descriptor
deprecated
func (*Any) GetTypeUrl ¶
func (*Any) ProtoMessage ¶
func (*Any) ProtoMessage()
func (*Any) ProtoReflect ¶
func (x *Any) ProtoReflect() protoreflect.Message
type Connection ¶
type Connection struct { // PeerAddr is the address of the client envoy, from network layer PeerAddr string NodeID string // Time of connection, for debugging Connect time.Time // ConID is the connection identifier, used as a key in the connection table. // Currently based on the node name and a counter. ConID string // Metadata key-value pairs extending the Node identifier Metadata map[string]string // Watched resources for the connection Watched map[string][]string NonceSent map[string]string NonceAcked map[string]string // Only one can be set. SStream AggregatedDiscoveryService_StreamAggregatedResourcesServer CStream AggregatedDiscoveryService_StreamAggregatedResourcesClient // contains filtered or unexported fields }
Connection represents a single endpoint. An endpoint typically has 0 or 1 connections - but during restarts and drain it may have >1.
type GrpcService ¶
type GrpcService struct { UnimplementedAggregatedDiscoveryServiceServer Mux *msgs.Mux // contains filtered or unexported fields }
func NewXDS ¶
func NewXDS(mux *msgs.Mux) *GrpcService
func (*GrpcService) Send ¶
func (fx *GrpcService) Send(con *Connection, r *Response)
func (*GrpcService) SendAll ¶
func (fx *GrpcService) SendAll(r *Response)
func (*GrpcService) StreamAggregatedResources ¶
func (s *GrpcService) StreamAggregatedResources(stream AggregatedDiscoveryService_StreamAggregatedResourcesServer) error
Subscribe maps the the webpush subscribe request
type Node ¶
type Node struct { // An opaque node identifier for the Envoy node. This also provides the local // service node name. It should be set if any of the following features are // used: :ref:`statsd <arch_overview_statistics>`, :ref:`CDS // <config_cluster_manager_cds>`, and :ref:`HTTP tracing // <arch_overview_tracing>`, either in this message or via // :option:`--service-node`. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Defines the local service cluster name where Envoy is running. Though // optional, it should be set if any of the following features are used: // :ref:`statsd <arch_overview_statistics>`, :ref:`health check cluster // verification <config_cluster_manager_cluster_hc_service_name>`, // :ref:`runtime override directory <config_runtime_override_subdirectory>`, // :ref:`user agent addition <config_http_conn_man_add_user_agent>`, // :ref:`HTTP global rate limiting <config_http_filters_rate_limit>`, // :ref:`CDS <config_cluster_manager_cds>`, and :ref:`HTTP tracing // <arch_overview_tracing>`, either in this message or via // :option:`--service-cluster`. Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` // This is motivated by informing a management server during canary which // version of Envoy is being tested in a heterogeneous fleet. This will be set // by Envoy in management server RPCs. BuildVersion string `protobuf:"bytes,5,opt,name=build_version,json=buildVersion,proto3" json:"build_version,omitempty"` // contains filtered or unexported fields }
func (*Node) Descriptor
deprecated
func (*Node) GetBuildVersion ¶
func (*Node) GetCluster ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶
func (x *Node) ProtoReflect() protoreflect.Message
type Request ¶
type Request struct { // The version_info provided in the request messages will be the version_info // received with the most recent successfully processed response or empty on // the first request. It is expected that no new request is sent after a // response is received until the Envoy instance is ready to ACK/NACK the new // configuration. ACK/NACK takes place by returning the new API config version // as applied or the previous API config version respectively. Each type_url // (see below) has an independent version associated with it. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` // The node making the request. Node *Node `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"` // List of resources to subscribe to, e.g. list of cluster names or a route // configuration name. If this is empty, all resources for the API are // returned. LDS/CDS expect empty resource_names, since this is global // discovery for the Envoy instance. The LDS and CDS responses will then imply // a number of resources that need to be fetched via EDS/RDS, which will be // explicitly enumerated in resource_names. ResourceNames []string `protobuf:"bytes,3,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"` // Type of the resource that is being requested, e.g. // "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This is implicit // in requests made via singleton xDS APIs such as CDS, LDS, etc. but is // required for ADS. TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // nonce corresponding to DiscoveryResponse being ACK/NACKed. See above // discussion on version_info and the DiscoveryResponse nonce comment. This // may be empty if no nonce is available, e.g. at startup or for non-stream // xDS implementations. ResponseNonce string `protobuf:"bytes,5,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` // This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>` // failed to update configuration. The *message* field in *error_details* provides the Envoy // internal exception related to the failure. It is only intended for consumption during manual // debugging, the string provided is not guaranteed to be stable across Envoy versions. // google.rpc.Status ErrorDetail *Status `protobuf:"bytes,6,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` Resources []*Any `protobuf:"bytes,7,rep,name=resources,proto3" json:"resources,omitempty"` // contains filtered or unexported fields }
Binary compatible with DiscoveryRequest, with payload extension
func (*Request) Descriptor
deprecated
func (*Request) GetErrorDetail ¶
func (*Request) GetResourceNames ¶
func (*Request) GetResources ¶
func (*Request) GetResponseNonce ¶
func (*Request) GetTypeUrl ¶
func (*Request) GetVersionInfo ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { // The version of the response data. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` // The response resources. These resources are typed and depend on the API being called. // google.protobuf.Any Resources []*Any `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` // [#not-implemented-hide:] // Canary is used to support two Envoy command line flags: // // * --terminate-on-canary-transition-failure. When set, Envoy is able to // terminate if it detects that configuration is stuck at canary. Consider // this example sequence of updates: // - Management server applies a canary config successfully. // - Management server rolls back to a production config. // - Envoy rejects the new production config. // Since there is no sensible way to continue receiving configuration // updates, Envoy will then terminate and apply production config from a // clean slate. // * --dry-run-canary. When set, a canary response will never be applied, only // validated via a dry run. Canary bool `protobuf:"varint,3,opt,name=canary,proto3" json:"canary,omitempty"` // Type URL for resources. This must be consistent with the type_url in the // Any messages for resources if resources is non-empty. This effectively // identifies the xDS API when muxing over ADS. TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // For gRPC based subscriptions, the nonce provides a way to explicitly ack a // specific DiscoveryResponse in a following DiscoveryRequest. Additional // messages may have been sent by Envoy to the management server for the // previous version on the stream prior to this DiscoveryResponse, that were // unprocessed at response send time. The nonce allows the management server // to ignore any further DiscoveryRequests for the previous version until a // DiscoveryRequest bearing the nonce. The nonce is optional and is not // required for non-stream based xDS implementations. Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetResources ¶
func (*Response) GetTypeUrl ¶
func (*Response) GetVersionInfo ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type Status ¶
type Status struct { // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // A developer-facing error message, which should be in English. Any // user-facing error message should be localized and sent in the // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // A list of messages that carry the error details. There is a common set of // message types for APIs to use. // google.protobuf.Any Details []*Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"` // contains filtered or unexported fields }
func (*Status) Descriptor
deprecated
func (*Status) GetDetails ¶
func (*Status) GetMessage ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type UnimplementedAggregatedDiscoveryServiceServer ¶
type UnimplementedAggregatedDiscoveryServiceServer struct { }
UnimplementedAggregatedDiscoveryServiceServer must be embedded to have forward compatible implementations.
func (*UnimplementedAggregatedDiscoveryServiceServer) StreamAggregatedResources ¶
func (*UnimplementedAggregatedDiscoveryServiceServer) StreamAggregatedResources(AggregatedDiscoveryService_StreamAggregatedResourcesServer) error