Documentation ¶
Overview ¶
Package orchestrator is responsible for instrumenting inbound xDS client requests to the correct aggregated key, forwarding a representative request to the upstream origin server, and managing the lifecycle of downstream and upstream connections and associates streams. It implements go-control-plane's Cache interface in order to receive xDS-based requests, send responses, and handle gRPC streams.
This file manages the bookkeeping of downstream clients by tracking inbound requests to their corresponding response channels. The contents of this file are intended to only be used within the orchestrator module and should not be exported.
Package orchestrator is responsible for instrumenting inbound xDS client requests to the correct aggregated key, forwarding a representative request to the upstream origin server, and managing the lifecycle of downstream and upstream connections and associates streams. It implements go-control-plane's Cache interface in order to receive xDS-based requests, send responses, and handle gRPC streams.
Package orchestrator is responsible for instrumenting inbound xDS client requests to the correct aggregated key, forwarding a representative request to the upstream origin server, and managing the lifecycle of downstream and upstream connections and associates streams. It implements go-control-plane's Cache interface in order to receive xDS-based requests, send responses, and handle gRPC streams.
This file manages the bookkeeping of upstream responses by tracking the aggregated key and its corresponding receiver channel for upstream responses. The contents of this file are intended to only be used within the orchestrator module and should not be exported.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Orchestrator ¶
type Orchestrator interface { GetReadOnlyCache() cache.ReadOnlyCache GetDownstreamAggregatedKeys() (map[string]bool, error) ClearCacheEntries(keys []string) []error CreateWatch(transport.Request) (transport.Watch, func()) // contains filtered or unexported methods }
Orchestrator has the following responsibilities:
- Aggregates similar requests abiding by the aggregated keyer configurations.
- Maintains long lived streams with the upstream origin server for each representative discovery request.
- Maintains long lived streams with each downstream xDS client using go-control-plane's CreateWatch function.
- When new responses are available upstream, orchestrator relays and fans out the response back on the streams associated with the xDS clients.
- Updates the xds-relay cache with the latest state of the world.
Orchestrator will be using go-control-plane's gRPC server implementation to maintain the fanout to downstream clients. go-control-plane keeps an open connection with each downstream xDS client. When orchestrator receives an upstream response from the forwarded sample request (via a long lived channel), Orchestrator will cache the response, and fanout to the downstreams by supplying responses to the individual channels corresponding to each downstream connection (watcher). See the CreateWatch function for more details.
func New ¶
func New( ctx context.Context, logger log.Logger, scope tally.Scope, mapper mapper.Mapper, upstreamClient upstream.Client, cacheConfig *bootstrapv1.Cache, ) Orchestrator
New instantiates the mapper, cache, upstream client components necessary for the orchestrator to operate and returns an instance of the instantiated orchestrator.
type V2 ¶
type V2 struct {
// contains filtered or unexported fields
}
V2 cache wraps a shared cache
func (*V2) CreateWatch ¶
CreateWatch is the grpc backed xds handler
type V3 ¶
type V3 struct {
// contains filtered or unexported fields
}
V3 cache wraps a shared cache
func (*V3) CreateWatch ¶
CreateWatch is the grpc backed xds handler