Documentation ¶
Overview ¶
Package server provides an implementation of a streaming xDS server.
Index ¶
- type CallbackFuncs
- func (c CallbackFuncs) OnDeltaStreamClosed(streamID int64, node *core.Node)
- func (c CallbackFuncs) OnDeltaStreamOpen(ctx context.Context, streamID int64, typeURL string) error
- func (c CallbackFuncs) OnFetchRequest(ctx context.Context, req *discovery.DiscoveryRequest) error
- func (c CallbackFuncs) OnFetchResponse(req *discovery.DiscoveryRequest, resp *discovery.DiscoveryResponse)
- func (c CallbackFuncs) OnStreamClosed(streamID int64, node *core.Node)
- func (c CallbackFuncs) OnStreamDeltaRequest(streamID int64, req *discovery.DeltaDiscoveryRequest) error
- func (c CallbackFuncs) OnStreamDeltaResponse(streamID int64, req *discovery.DeltaDiscoveryRequest, ...)
- func (c CallbackFuncs) OnStreamOpen(ctx context.Context, streamID int64, typeURL string) error
- func (c CallbackFuncs) OnStreamRequest(streamID int64, req *discovery.DiscoveryRequest) error
- func (c CallbackFuncs) OnStreamResponse(ctx context.Context, streamID int64, req *discovery.DiscoveryRequest, ...)
- type Callbacks
- type HTTPGateway
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackFuncs ¶
type CallbackFuncs struct { StreamOpenFunc func(context.Context, int64, string) error StreamClosedFunc func(int64, *core.Node) DeltaStreamOpenFunc func(context.Context, int64, string) error DeltaStreamClosedFunc func(int64, *core.Node) StreamRequestFunc func(int64, *discovery.DiscoveryRequest) error StreamResponseFunc func(context.Context, int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse) StreamDeltaRequestFunc func(int64, *discovery.DeltaDiscoveryRequest) error StreamDeltaResponseFunc func(int64, *discovery.DeltaDiscoveryRequest, *discovery.DeltaDiscoveryResponse) FetchRequestFunc func(context.Context, *discovery.DiscoveryRequest) error FetchResponseFunc func(*discovery.DiscoveryRequest, *discovery.DiscoveryResponse) }
CallbackFuncs is a convenience type for implementing the Callbacks interface.
func (CallbackFuncs) OnDeltaStreamClosed ¶
func (c CallbackFuncs) OnDeltaStreamClosed(streamID int64, node *core.Node)
OnDeltaStreamClosed invokes DeltaStreamClosedFunc.
func (CallbackFuncs) OnDeltaStreamOpen ¶
OnDeltaStreamOpen invokes DeltaStreamOpenFunc.
func (CallbackFuncs) OnFetchRequest ¶
func (c CallbackFuncs) OnFetchRequest(ctx context.Context, req *discovery.DiscoveryRequest) error
OnFetchRequest invokes FetchRequestFunc.
func (CallbackFuncs) OnFetchResponse ¶
func (c CallbackFuncs) OnFetchResponse(req *discovery.DiscoveryRequest, resp *discovery.DiscoveryResponse)
OnFetchResponse invoked FetchResponseFunc.
func (CallbackFuncs) OnStreamClosed ¶
func (c CallbackFuncs) OnStreamClosed(streamID int64, node *core.Node)
OnStreamClosed invokes StreamClosedFunc.
func (CallbackFuncs) OnStreamDeltaRequest ¶
func (c CallbackFuncs) OnStreamDeltaRequest(streamID int64, req *discovery.DeltaDiscoveryRequest) error
OnStreamDeltaRequest invokes StreamDeltaResponseFunc
func (CallbackFuncs) OnStreamDeltaResponse ¶
func (c CallbackFuncs) OnStreamDeltaResponse(streamID int64, req *discovery.DeltaDiscoveryRequest, resp *discovery.DeltaDiscoveryResponse)
OnStreamDeltaResponse invokes StreamDeltaResponseFunc.
func (CallbackFuncs) OnStreamOpen ¶
OnStreamOpen invokes StreamOpenFunc.
func (CallbackFuncs) OnStreamRequest ¶
func (c CallbackFuncs) OnStreamRequest(streamID int64, req *discovery.DiscoveryRequest) error
OnStreamRequest invokes StreamRequestFunc.
func (CallbackFuncs) OnStreamResponse ¶
func (c CallbackFuncs) OnStreamResponse(ctx context.Context, streamID int64, req *discovery.DiscoveryRequest, resp *discovery.DiscoveryResponse)
OnStreamResponse invokes StreamResponseFunc.
type Callbacks ¶
type Callbacks interface { rest.Callbacks sotw.Callbacks delta.Callbacks }
Callbacks is a collection of callbacks inserted into the server operation. The callbacks are invoked synchronously.
type HTTPGateway ¶
type HTTPGateway struct { // Server is the underlying gRPC server Server Server }
HTTPGateway is a custom implementation of [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) specialized to Envoy xDS API.
type Server ¶
type Server interface { endpointservice.EndpointDiscoveryServiceServer clusterservice.ClusterDiscoveryServiceServer routeservice.RouteDiscoveryServiceServer routeservice.ScopedRoutesDiscoveryServiceServer routeservice.VirtualHostDiscoveryServiceServer listenerservice.ListenerDiscoveryServiceServer discoverygrpc.AggregatedDiscoveryServiceServer secretservice.SecretDiscoveryServiceServer runtimeservice.RuntimeDiscoveryServiceServer extensionconfigservice.ExtensionConfigDiscoveryServiceServer rest.Server sotw.Server delta.Server }
Server is a collection of handlers for streaming discovery requests.
func NewServerAdvanced ¶
func NewServerAdvanced(restServer rest.Server, sotwServer sotw.Server, deltaServer delta.Server) Server