envoy

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSecret

func NewSecret(name, privateKey, certificateChain string) *auth.Secret

NewSecret generates a new envoy api secret struct from the given params

Types

type Callbacks

type Callbacks struct {
	Logger *zap.SugaredLogger
}

Callbacks is a type that implements go-control-plane/pkg/server/Callbacks

func (*Callbacks) OnFetchRequest

func (cb *Callbacks) OnFetchRequest(ctx context.Context, req *v2.DiscoveryRequest) error

OnFetchRequest implements go-control-plane/pkg/server/Callbacks.OnFetchRequest OnFetchRequest is called for each Fetch request. Returning an error will end processing of the request and respond with an error.

func (*Callbacks) OnFetchResponse

func (cb *Callbacks) OnFetchResponse(req *v2.DiscoveryRequest, resp *v2.DiscoveryResponse)

OnFetchResponse implements go-control-plane/pkg/server/Callbacks.OnFetchRequest OnFetchResponse is called immediately prior to sending a response.

func (*Callbacks) OnStreamClosed

func (cb *Callbacks) OnStreamClosed(id int64)

OnStreamClosed implements go-control-plane/pkg/server/Callbacks.OnStreamClosed OnStreamClosed is called immediately prior to closing an xDS stream with a stream ID.

func (*Callbacks) OnStreamOpen

func (cb *Callbacks) OnStreamOpen(ctx context.Context, id int64, typ string) error

OnStreamOpen implements go-control-plane/pkg/server/Callbacks.OnStreamOpen Returning an error will end processing and close the stream. OnStreamClosed will still be called.

func (*Callbacks) OnStreamRequest

func (cb *Callbacks) OnStreamRequest(id int64, req *v2.DiscoveryRequest) error

OnStreamRequest implements go-control-plane/pkg/server/Callbacks.OnStreamRequest 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 (*Callbacks) OnStreamResponse

func (cb *Callbacks) OnStreamResponse(id int64, req *v2.DiscoveryRequest, rsp *v2.DiscoveryResponse)

OnStreamResponse implements go-control-plane/pkg/server/Callbacks.OnStreamResponse OnStreamResponse is called immediately prior to sending a response on a stream.

type XdsServer

type XdsServer struct {
	// contains filtered or unexported fields
}

XdsServer is a type that holds configuration and runtime objects for the envoy xds server

func NewXdsServer

func NewXdsServer(ctx context.Context, adsPort uint,
	tlsConfig *tls.Config, callbacks xds.Callbacks, logger *zap.SugaredLogger) *XdsServer

NewXdsServer creates a new XdsServer object fron the given params

func (*XdsServer) GetSnapshotCache

func (xdss *XdsServer) GetSnapshotCache() *cache.SnapshotCache

GetSnapshotCache returns the xds_cache.SnapshotCache

func (*XdsServer) RunADSServer

func (xdss *XdsServer) RunADSServer() error

RunADSServer starts an xDS server at the given port.

Jump to

Keyboard shortcuts

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