Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BackgroundLearningKeys = []Key{ util.Must(NewKey(util.Must(anypb.New(&buildqueuestate_pb.BackgroundLearning{})))), }
BackgroundLearningKeys is a predefined list of Keys that is used for all operations that are created to perform background learning (see initialsizeclass.FeedbackAnalyzer).
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key string
Key for identifying client invocations. InMemoryBuildQueue uses this type to group operations within a given size class queue. This grouping is used to introduce fairness between builds.
For most setups, it is sufficient to set the Key to the tool invocation ID that's part of the RequestMetadata header. For more advanced setups, it may be recommended to include information such as the username.
type KeyExtractor ¶
KeyExtractor is responsible for extracting an invocation key from an incoming execution request. Operations will be grouped by invocation key and scheduled fairly.
Implementations of KeyExtract may construct keys based on request metadata or user credentials.
var AuthenticationMetadataKeyExtractor KeyExtractor = authenticationMetadataKeyExtractor{}
AuthenticationMetadataKeyExtractor is an implementation of KeyExtractor that returns a Key that is based on the publicly displayable part of the authentication metadata. This will cause InMemoryBuildQueue to group all operations created by the same user together, which ensures fair scheduling between users.
func NewKeyExtractorFromConfiguration ¶
func NewKeyExtractorFromConfiguration(configuration *pb.InvocationKeyExtractorConfiguration) (KeyExtractor, error)
NewKeyExtractorFromConfiguration creates a KeyExtractor based on settings provided in a configuration file.