routing

package
v0.0.0-...-43ed5bc Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionRouter

type ActionRouter interface {
	RouteAction(ctx context.Context, action *encryptedaction_pb.Action) ([]invocation.Key, initialsizeclass.Selector, error)
}

ActionRouter is responsible for doing all forms of analysis on an incoming execution request up to the point where InMemoryBuildQueue acquires locks and enqueues an operation. ActionRouter is responsible for the following things:

  • To extract invocation keys from the client's context, so that InMemoryBuildQueue can group operations belonging to the same client and schedule them fairly with respect to other clients.
  • To create an initial size class selector, which InMemoryBuildQueue can use to select the appropriate worker size.

func NewActionRouterFromConfiguration

func NewActionRouterFromConfiguration(
	configuration *pb.ActionRouterConfiguration,
	previousExecutionStatsStore initialsizeclass.PreviousExecutionStatsStore,
	previousExecutionStatsCommonKeyDataReference object.LocalReference,
	previousExecutionStatsDecodingParametersSizeBytes int,
) (ActionRouter, error)

NewActionRouterFromConfiguration creates an ActionRouter based on options specified in a configuration file.

func NewSimpleActionRouter

func NewSimpleActionRouter(invocationKeyExtractors []invocation.KeyExtractor, initialSizeClassAnalyzer initialsizeclass.Analyzer) ActionRouter

NewSimpleActionRouter creates an ActionRouter that creates invocation keys and an initial size class selector by independently calling into separate extractors/analyzers.

This implementation should be sufficient for most simple setups, where only a small number of execution platforms exist, or where scheduling decisions are identical for all platforms.

Jump to

Keyboard shortcuts

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