Documentation ¶
Index ¶
- func NewSecret(name, privateKey, certificateChain string) *auth.Secret
- type Callbacks
- func (cb *Callbacks) OnFetchRequest(ctx context.Context, req *v2.DiscoveryRequest) error
- func (cb *Callbacks) OnFetchResponse(req *v2.DiscoveryRequest, resp *v2.DiscoveryResponse)
- func (cb *Callbacks) OnStreamClosed(id int64)
- func (cb *Callbacks) OnStreamOpen(ctx context.Context, id int64, typ string) error
- func (cb *Callbacks) OnStreamRequest(id int64, req *v2.DiscoveryRequest) error
- func (cb *Callbacks) OnStreamResponse(i int64, request *v2.DiscoveryRequest, response *v2.DiscoveryResponse)
- type XdsServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Callbacks ¶
type Callbacks struct {
Logger *zap.SugaredLogger
}
Callbacks is a type that implements go-control-plane/pkg/server/Callbacks
func (*Callbacks) OnFetchRequest ¶
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 ¶
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 ¶
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(i int64, request *v2.DiscoveryRequest, response *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, gatewayPort uint, managementPort 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) RunManagementGateway ¶
func (xdss *XdsServer) RunManagementGateway()
RunManagementGateway starts an HTTP gateway to an xDS server.
func (*XdsServer) RunManagementServer ¶
func (xdss *XdsServer) RunManagementServer()
RunManagementServer starts an xDS server at the given port.