Documentation ¶
Index ¶
- type Cache
- type Callbacks
- func (cb *Callbacks) OnDeltaStreamClosed(int64)
- func (cb *Callbacks) OnDeltaStreamOpen(context.Context, int64, string) error
- func (cb *Callbacks) OnFetchRequest(context.Context, *envoy_service_discovery_v3.DiscoveryRequest) error
- func (cb *Callbacks) OnFetchResponse(*envoy_service_discovery_v3.DiscoveryRequest, ...)
- func (cb *Callbacks) OnStreamClosed(id int64)
- func (cb *Callbacks) OnStreamDeltaRequest(int64, *envoy_service_discovery_v3.DeltaDiscoveryRequest) error
- func (cb *Callbacks) OnStreamDeltaResponse(int64, *envoy_service_discovery_v3.DeltaDiscoveryRequest, ...)
- func (cb *Callbacks) OnStreamOpen(ctx context.Context, id int64, typ string) error
- func (cb *Callbacks) OnStreamRequest(id int64, req *envoy_service_discovery_v3.DiscoveryRequest) error
- func (cb *Callbacks) OnStreamResponse(ctx context.Context, id int64, ...)
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache implements "github.com/3scale-ops/marin3r/pkg/discoveryservice/xdss".Cache for envoy API v3.
func (Cache) ClearSnapshot ¶
ClearSnapshot clears snapshot and info for a node.
func (Cache) GetSnapshot ¶
GetSnapshot gets the snapshot for a node, and returns an error if not found.
func (Cache) NewSnapshot ¶
NewSnapshot returns a Snapshot object
type Callbacks ¶
Callbacks is a type that implements go-control-plane/pkg/server/Callbacks
func (*Callbacks) OnDeltaStreamClosed ¶ added in v0.9.0
OnDeltaStreamClosed is called immediately prior to closing an xDS stream with a stream ID.
func (*Callbacks) OnDeltaStreamOpen ¶ added in v0.9.0
OnDeltaStreamOpen is called once an incremental 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 (*Callbacks) OnFetchRequest ¶
func (cb *Callbacks) OnFetchRequest(context.Context, *envoy_service_discovery_v3.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(*envoy_service_discovery_v3.DiscoveryRequest, *envoy_service_discovery_v3.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) OnStreamDeltaRequest ¶ added in v0.9.0
func (cb *Callbacks) OnStreamDeltaRequest(int64, *envoy_service_discovery_v3.DeltaDiscoveryRequest) error
OnStreamDeltaRequest 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) OnStreamDeltaResponse ¶ added in v0.9.0
func (cb *Callbacks) OnStreamDeltaResponse(int64, *envoy_service_discovery_v3.DeltaDiscoveryRequest, *envoy_service_discovery_v3.DeltaDiscoveryResponse)
OnStreamDelatResponse is called immediately prior to sending a response on a stream.
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 *envoy_service_discovery_v3.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(ctx context.Context, id int64, req *envoy_service_discovery_v3.DiscoveryRequest, rsp *envoy_service_discovery_v3.DiscoveryResponse)
OnStreamResponse implements go-control-plane/pkgserver/Callbacks.OnStreamResponse OnStreamResponse is called immediately prior to sending a response on a stream.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot implements "github.com/3scale-ops/marin3r/pkg/discoveryservice/xdss".Snapshot for envoy API v3.
func NewSnapshot ¶
NewSnapshot returns a Snapshot object.
func (Snapshot) Consistent ¶
Consistent check verifies that the dependent resources are exactly listed in the snapshot: - all EDS resources are listed by name in CDS resources - all RDS resources are listed by name in LDS resources
Note that clusters and listeners are requested without name references, so Envoy will accept the snapshot list of clusters as-is even if it does not match all references found in xDS.
func (Snapshot) GetResources ¶
GetResources selects snapshot resources by type.
func (Snapshot) GetVersion ¶
GetVersion returns the version for a resource type.
func (Snapshot) SetResource ¶
SetResource writes the given v3 resource in the Snapshot object.