Documentation ¶
Overview ¶
Package request provides a library to create swarming requests based on skylab test or task parameters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct { // Cmd specifies the payload command to run for the request. Cmd worker.Command // TODO(crbug.com/1033291): Rename to Skylab tags. SwarmingTags []string // ProvisionableDimensions specifies the provisionable dimensions in raw // string form; e.g. {"provisionable-cros-version:foo-cq-R75-1.2.3.4"} ProvisionableDimensions []string // ProvisionableDimensionExpiration specifies the interval of time // during which Swarming will attempt to find a bot matching optional // (i.e. provisionable) dimensions. After the expiration time Swarming // will only use required dimensions for finding the bot. ProvisionableDimensionExpiration time.Duration // Dimensions specifies swarming dimensions in raw string form. // // It is preferable to specify dimensions via the SchedulableLabels // argument. This argument should only be used for user-supplied freeform // dimensions; e.g. {"label-power:battery"} Dimensions []string // SchedulableLabels specifies schedulable label requirements that will // be translated to dimensions. SchedulableLabels *inventory.SchedulableLabels Timeout time.Duration Priority int64 ParentTaskID string ParentRequestUID string // Pubsub Topic for status updates on the tests run for the request StatusTopic string // Test describes the test to be run. TestRunnerRequest *skylab_test_runner.Request }
Args defines the set of arguments for creating a request.
func (*Args) NewBBRequest ¶
func (a *Args) NewBBRequest(b *buildbucket_pb.BuilderID) (*buildbucket_pb.ScheduleBuildRequest, error)
NewBBRequest returns the Buildbucket request to create the test_runner build with these arguments.
func (*Args) StaticDimensions ¶
func (a *Args) StaticDimensions() ([]*swarming.SwarmingRpcsStringPair, error)
StaticDimensions returns the dimensions required on a Swarming bot that can service this request.
StaticDimensions() do not include dimensions used to optimize task scheduling.
func (*Args) SwarmingNewTaskRequest ¶
func (a *Args) SwarmingNewTaskRequest() (*swarming.SwarmingRpcsNewTaskRequest, error)
SwarmingNewTaskRequest returns the Swarming request to create the Skylab task with these arguments.
type MessagePayload ¶
type MessagePayload struct {
ParentRequestUID string `json:"parent_request_uid,omitempty"`
}
MessagePayload contains the information for Pubsub subscribers.
Click to show internal directories.
Click to hide internal directories.