Documentation ¶
Index ¶
- type BuildQueue
- func NewAuthorizingBuildQueue(backend BuildQueue, authorizer auth.Authorizer) BuildQueue
- func NewDemultiplexingBuildQueue(getBackend DemultiplexedBuildQueueGetter) BuildQueue
- func NewDemultiplexingBuildQueueFromConfiguration(schedulers map[string]*pb.SchedulerConfiguration, ...) (BuildQueue, error)
- func NewForwardingBuildQueue(client grpc.ClientConnInterface) BuildQueue
- type DemultiplexedBuildQueueGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildQueue ¶
type BuildQueue interface { capabilities.Provider remoteexecution.ExecutionServer }
BuildQueue is an interface for the set of operations that a scheduler process must implement.
func NewAuthorizingBuildQueue ¶
func NewAuthorizingBuildQueue(backend BuildQueue, authorizer auth.Authorizer) BuildQueue
NewAuthorizingBuildQueue creates a BuildQueue which authorizes Execute requests. Note that WaitExecution requests are not authorized, as their instance name is not known.
func NewDemultiplexingBuildQueue ¶
func NewDemultiplexingBuildQueue(getBackend DemultiplexedBuildQueueGetter) BuildQueue
NewDemultiplexingBuildQueue creates an adapter for the Execution service to forward requests to different backends based on the instance name given in requests.
Job identifiers returned by backends are prefixed with the instance name, so that successive requests may demultiplex the requests later on. The string "/operations/" is used as a separator between the instance name and the original operation name, as instance names are guaranteed to not contain that string.
func NewDemultiplexingBuildQueueFromConfiguration ¶
func NewDemultiplexingBuildQueueFromConfiguration(schedulers map[string]*pb.SchedulerConfiguration, grpcClientFactory grpc.ClientFactory) (BuildQueue, error)
NewDemultiplexingBuildQueueFromConfiguration creates a DemultiplexingBuildQueue that forwards traffic to schedulers specified in the configuration file.
func NewForwardingBuildQueue ¶
func NewForwardingBuildQueue(client grpc.ClientConnInterface) BuildQueue
NewForwardingBuildQueue creates a GRPC service for the Capabilities and Execution service that simply forwards all requests to a GRPC client. This may be used by the frontend processes to forward execution requests to scheduler processes in unmodified form.
type DemultiplexedBuildQueueGetter ¶
type DemultiplexedBuildQueueGetter func(ctx context.Context, instanceName digest.InstanceName) (BuildQueue, digest.InstanceName, digest.InstanceName, error)
DemultiplexedBuildQueueGetter is the callback invoked by the demultiplexing build queue to obtain a backend that matches the instance name that is provided.