Documentation
¶
Overview ¶
Package sotw provides an implementation of GRPC SoTW (State of The World) part of XDS server
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeactivateLegacyWildcard ¶ added in v0.14.0
DeactivateLegacyWildcard deactivates legacy wildcard mode for all resource types. In legacy wildcard mode, empty requests to a stream, are treated as wildcard requests as long as there is no request made with resources or explicit wildcard requests on the same stream. When deactivated, empty requests are treated as a request with no subscriptions to any resource. This is recommended for when you are using the go-control-plane to serve grpc-xds clients. These clients never want to treat an empty request as a wildcard subscription.
func DeactivateLegacyWildcardForTypes ¶ added in v0.14.0
DeactivateLegacyWildcardForTypes deactivates legacy wildcard mode for specific resource types. In legacy wildcard mode, empty requests to a stream, are treated as wildcard requests as long as there is no request made with resources or explicit wildcard requests on the same stream. When deactivated, empty requests are treated as a request with no subscriptions to any resource.
func WithLogger ¶ added in v0.14.0
WithLogger configures the server logger. Defaults to no logging
func WithOrderedADS ¶ added in v0.12.0
WithOrderedADS enables the internal flag to order responses strictly.
Types ¶
type Callbacks ¶
type Callbacks interface {
// OnStreamOpen is called once an xDS stream is open with a stream ID and the type URL (or "" for ADS).
// Returning an error will end processing and close the stream. OnStreamClosed will still be called.
OnStreamOpen(context.Context, int64, string) error
// OnStreamClosed is called immediately prior to closing an xDS stream with a stream ID.
OnStreamClosed(int64, *core.Node)
// OnStreamRequest is called once a request is received on a stream.
// Returning an error will end processing and close the stream. OnStreamClosed will still be called.
OnStreamRequest(int64, *discovery.DiscoveryRequest) error
// OnStreamResponse is called immediately prior to sending a response on a stream.
OnStreamResponse(context.Context, int64, *discovery.DiscoveryRequest, *discovery.DiscoveryResponse)
}