v2

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdaptCallbacks

func AdaptCallbacks(callbacks xds.Callbacks) envoy_xds.Callbacks

AdaptCallbacks translate Kuma callbacks to real go-control-plane Callbacks

func NewControlPlaneIdCallbacks

func NewControlPlaneIdCallbacks(id string) envoy_xds.Callbacks

func NewWatchdogCallbacks

func NewWatchdogCallbacks(newNodeWatchdog NewNodeWatchdogFunc) envoy_xds.Callbacks

Types

type CallbacksChain

type CallbacksChain []envoy_xds.Callbacks

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

func (chain CallbacksChain) OnStreamOpen(ctx context.Context, streamID int64, typ string) error

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 (*NoopCallbacks) OnFetchResponse

func (*NoopCallbacks) OnStreamClosed

func (c *NoopCallbacks) OnStreamClosed(int64)

func (*NoopCallbacks) OnStreamOpen

func (c *NoopCallbacks) OnStreamOpen(context.Context, int64, string) error

func (*NoopCallbacks) OnStreamRequest

func (c *NoopCallbacks) OnStreamRequest(int64, *envoy_api.DiscoveryRequest) error

func (*NoopCallbacks) OnStreamResponse

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL