builder

package
v0.0.0-...-a9d0937 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 15 Imported by: 4

Documentation

Index

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.

Details: https://github.com/grpc/grpc-go/issues/2297

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.

Jump to

Keyboard shortcuts

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