Documentation ¶
Index ¶
- func AdaptCallbacks(callbacks xds.Callbacks) envoy_xds.Callbacks
- func NewControlPlaneIdCallbacks(id string) envoy_xds.Callbacks
- func NewWatchdogCallbacks(newNodeWatchdog NewNodeWatchdogFunc) envoy_xds.Callbacks
- type CallbacksChain
- func (chain CallbacksChain) OnFetchRequest(ctx context.Context, req *envoy.DiscoveryRequest) error
- func (chain CallbacksChain) OnFetchResponse(req *envoy.DiscoveryRequest, resp *envoy.DiscoveryResponse)
- func (chain CallbacksChain) OnStreamClosed(streamID int64)
- func (chain CallbacksChain) OnStreamOpen(ctx context.Context, streamID int64, typ string) error
- func (chain CallbacksChain) OnStreamRequest(streamID int64, req *envoy.DiscoveryRequest) error
- func (chain CallbacksChain) OnStreamResponse(streamID int64, req *envoy.DiscoveryRequest, resp *envoy.DiscoveryResponse)
- type NewNodeWatchdogFunc
- type NoopCallbacks
- func (c *NoopCallbacks) OnFetchRequest(context.Context, *envoy_api.DiscoveryRequest) error
- func (c *NoopCallbacks) OnFetchResponse(*envoy_api.DiscoveryRequest, *envoy_api.DiscoveryResponse)
- func (c *NoopCallbacks) OnStreamClosed(int64)
- func (c *NoopCallbacks) OnStreamOpen(context.Context, int64, string) error
- func (c *NoopCallbacks) OnStreamRequest(int64, *envoy_api.DiscoveryRequest) error
- func (c *NoopCallbacks) OnStreamResponse(int64, *envoy_api.DiscoveryRequest, *envoy_api.DiscoveryResponse)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdaptCallbacks ¶
AdaptCallbacks translate Kuma callbacks to real go-control-plane Callbacks
func NewWatchdogCallbacks ¶
func NewWatchdogCallbacks(newNodeWatchdog NewNodeWatchdogFunc) envoy_xds.Callbacks
Types ¶
type CallbacksChain ¶
func (CallbacksChain) OnFetchRequest ¶
func (chain CallbacksChain) OnFetchRequest(ctx context.Context, req *envoy.DiscoveryRequest) error
OnFetchRequest is called for each Fetch request. Returning an error will end processing of the request and respond with an error.
func (CallbacksChain) OnFetchResponse ¶
func (chain CallbacksChain) OnFetchResponse(req *envoy.DiscoveryRequest, resp *envoy.DiscoveryResponse)
OnFetchRequest is called for each Fetch request. Returning an error will end processing of the request and respond with an error. OnFetchResponse is called immediately prior to sending a response.
func (CallbacksChain) OnStreamClosed ¶
func (chain CallbacksChain) OnStreamClosed(streamID int64)
OnStreamClosed is called immediately prior to closing an xDS stream with a stream ID.
func (CallbacksChain) OnStreamOpen ¶
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.
func (CallbacksChain) OnStreamRequest ¶
func (chain CallbacksChain) OnStreamRequest(streamID int64, req *envoy.DiscoveryRequest) error
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.
func (CallbacksChain) OnStreamResponse ¶
func (chain CallbacksChain) OnStreamResponse(streamID int64, req *envoy.DiscoveryRequest, resp *envoy.DiscoveryResponse)
OnStreamResponse is called immediately prior to sending a response on a stream.
type NewNodeWatchdogFunc ¶
type NewNodeWatchdogFunc func(ctx context.Context, node *envoy_core.Node, streamId int64) (util_watchdog.Watchdog, error)
type NoopCallbacks ¶
type NoopCallbacks struct { }
func (*NoopCallbacks) OnFetchRequest ¶
func (c *NoopCallbacks) OnFetchRequest(context.Context, *envoy_api.DiscoveryRequest) error
func (*NoopCallbacks) OnFetchResponse ¶
func (c *NoopCallbacks) OnFetchResponse(*envoy_api.DiscoveryRequest, *envoy_api.DiscoveryResponse)
func (*NoopCallbacks) OnStreamClosed ¶
func (c *NoopCallbacks) OnStreamClosed(int64)
func (*NoopCallbacks) OnStreamOpen ¶
func (*NoopCallbacks) OnStreamRequest ¶
func (c *NoopCallbacks) OnStreamRequest(int64, *envoy_api.DiscoveryRequest) error
func (*NoopCallbacks) OnStreamResponse ¶
func (c *NoopCallbacks) OnStreamResponse(int64, *envoy_api.DiscoveryRequest, *envoy_api.DiscoveryResponse)