pluginpb

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskSpec_StateCategory_name = map[int32]string{
		0:  "TASK_STATE_CATEGORY_UNSPECIFIED",
		15: "TASK_STATE_MASK",
		16: "CATEGORY_PENDING",
		32: "CATEGORY_RUNNING",
		48: "CATEGORY_TRANSIENT_DONE",
		64: "CATEGORY_EXECUTION_DONE",
		80: "CATEGORY_NEVER_RAN_DONE",
	}
	TaskSpec_StateCategory_value = map[string]int32{
		"TASK_STATE_CATEGORY_UNSPECIFIED": 0,
		"TASK_STATE_MASK":                 15,
		"CATEGORY_PENDING":                16,
		"CATEGORY_RUNNING":                32,
		"CATEGORY_TRANSIENT_DONE":         48,
		"CATEGORY_EXECUTION_DONE":         64,
		"CATEGORY_NEVER_RAN_DONE":         80,
	}
)

Enum value maps for TaskSpec_StateCategory.

View Source
var (
	TaskSpec_State_name = map[int32]string{
		0:  "TASK_STATE_INVALID",
		16: "PENDING",
		17: "PENDING_DEDUPING",
		32: "RUNNING",
		33: "RUNNING_OVERHEAD_SETUP",
		34: "RUNNING_OVERHEAD_TEARDOWN",
		35: "TERMINATING",
		47: "COMPLETING",
		48: "RAN_INTERNAL_FAILURE",
		49: "DUT_FAILURE",
		50: "BOT_DISAPPEARED",
		51: "PREEMPTED",
		64: "COMPLETED",
		65: "TIMED_OUT",
		66: "TIMED_OUT_SILENCE",
		67: "KILLED",
		68: "MISSING_INPUTS",
		80: "DEDUPED",
		81: "EXPIRED",
		82: "CANCELED",
		83: "NO_RESOURCE",
		84: "LOAD_SHED",
		85: "RESOURCE_EXHAUSTED",
		86: "SKIPPED_INTERNAL_FAILURE",
		87: "CLIENT_ERROR",
	}
	TaskSpec_State_value = map[string]int32{
		"TASK_STATE_INVALID":        0,
		"PENDING":                   16,
		"PENDING_DEDUPING":          17,
		"RUNNING":                   32,
		"RUNNING_OVERHEAD_SETUP":    33,
		"RUNNING_OVERHEAD_TEARDOWN": 34,
		"TERMINATING":               35,
		"COMPLETING":                47,
		"RAN_INTERNAL_FAILURE":      48,
		"DUT_FAILURE":               49,
		"BOT_DISAPPEARED":           50,
		"PREEMPTED":                 51,
		"COMPLETED":                 64,
		"TIMED_OUT":                 65,
		"TIMED_OUT_SILENCE":         66,
		"KILLED":                    67,
		"MISSING_INPUTS":            68,
		"DEDUPED":                   80,
		"EXPIRED":                   81,
		"CANCELED":                  82,
		"NO_RESOURCE":               83,
		"LOAD_SHED":                 84,
		"RESOURCE_EXHAUSTED":        85,
		"SKIPPED_INTERNAL_FAILURE":  86,
		"CLIENT_ERROR":              87,
	}
)

Enum value maps for TaskSpec_State.

View Source
var (
	GetCancellationsResponse_Cancellation_Reason_name = map[int32]string{
		0: "INVALID",
		1: "PREEMPTED",
		2: "ERROR",
	}
	GetCancellationsResponse_Cancellation_Reason_value = map[string]int32{
		"INVALID":   0,
		"PREEMPTED": 1,
		"ERROR":     2,
	}
)

Enum value maps for GetCancellationsResponse_Cancellation_Reason.

View Source
var File_go_chromium_org_luci_swarming_proto_plugin_plugin_proto protoreflect.FileDescriptor

Functions

func FileDescriptorSet

func FileDescriptorSet() *descriptorpb.FileDescriptorSet

FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.

Will not return nil.

Do NOT modify the returned descriptor.

func RegisterExternalSchedulerServer

func RegisterExternalSchedulerServer(s prpc.Registrar, srv ExternalSchedulerServer)

Types

type AssignTasksRequest

type AssignTasksRequest struct {

	// SchedulerID is the id of the scheduler that this request should be run on.
	SchedulerId string `protobuf:"bytes,1,opt,name=scheduler_id,json=schedulerId,proto3" json:"scheduler_id,omitempty"`
	// IdleBots is the set of idle bots that are trying to get tasks assigned.
	IdleBots []*IdleBot `protobuf:"bytes,2,rep,name=idle_bots,json=idleBots,proto3" json:"idle_bots,omitempty"`
	// Time is the current time (according to swarming) at which these bots
	// are attempting to have tasks assigned to them.
	Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*AssignTasksRequest) Descriptor deprecated

func (*AssignTasksRequest) Descriptor() ([]byte, []int)

Deprecated: Use AssignTasksRequest.ProtoReflect.Descriptor instead.

func (*AssignTasksRequest) GetIdleBots

func (x *AssignTasksRequest) GetIdleBots() []*IdleBot

func (*AssignTasksRequest) GetSchedulerId

func (x *AssignTasksRequest) GetSchedulerId() string

func (*AssignTasksRequest) GetTime

func (*AssignTasksRequest) ProtoMessage

func (*AssignTasksRequest) ProtoMessage()

func (*AssignTasksRequest) ProtoReflect

func (x *AssignTasksRequest) ProtoReflect() protoreflect.Message

func (*AssignTasksRequest) Reset

func (x *AssignTasksRequest) Reset()

func (*AssignTasksRequest) String

func (x *AssignTasksRequest) String() string

func (*AssignTasksRequest) Validate

func (r *AssignTasksRequest) Validate() error

Validate returns an error if r is invalid.

type AssignTasksResponse

type AssignTasksResponse struct {

	// Assignments is the set of (bot, task) assignments that the scheduler
	// determined should be made.
	Assignments []*TaskAssignment `protobuf:"bytes,1,rep,name=assignments,proto3" json:"assignments,omitempty"`
	// contains filtered or unexported fields
}

func (*AssignTasksResponse) Descriptor deprecated

func (*AssignTasksResponse) Descriptor() ([]byte, []int)

Deprecated: Use AssignTasksResponse.ProtoReflect.Descriptor instead.

func (*AssignTasksResponse) GetAssignments

func (x *AssignTasksResponse) GetAssignments() []*TaskAssignment

func (*AssignTasksResponse) ProtoMessage

func (*AssignTasksResponse) ProtoMessage()

func (*AssignTasksResponse) ProtoReflect

func (x *AssignTasksResponse) ProtoReflect() protoreflect.Message

func (*AssignTasksResponse) Reset

func (x *AssignTasksResponse) Reset()

func (*AssignTasksResponse) String

func (x *AssignTasksResponse) String() string

type DecoratedExternalScheduler

type DecoratedExternalScheduler struct {
	// Service is the service to decorate.
	Service ExternalSchedulerServer
	// Prelude is called for each method before forwarding the call to Service.
	// If Prelude returns an error, then the call is skipped and the error is
	// processed via the Postlude (if one is defined), or it is returned directly.
	Prelude func(ctx context.Context, methodName string, req proto.Message) (context.Context, error)
	// Postlude is called for each method after Service has processed the call, or
	// after the Prelude has returned an error. This takes the Service's
	// response proto (which may be nil) and/or any error. The decorated
	// service will return the response (possibly mutated) and error that Postlude
	// returns.
	Postlude func(ctx context.Context, methodName string, rsp proto.Message, err error) error
}

func (*DecoratedExternalScheduler) AssignTasks

func (*DecoratedExternalScheduler) GetCallbacks

func (*DecoratedExternalScheduler) GetCancellations

func (*DecoratedExternalScheduler) NotifyTasks

type ExternalSchedulerClient

type ExternalSchedulerClient interface {
	// AssignTasks determines which tasks should be run on which of the supplied
	// idle bots.
	AssignTasks(ctx context.Context, in *AssignTasksRequest, opts ...grpc.CallOption) (*AssignTasksResponse, error)
	// GetCancellations determines which tasks should be cancelled on which bots.
	GetCancellations(ctx context.Context, in *GetCancellationsRequest, opts ...grpc.CallOption) (*GetCancellationsResponse, error)
	// NotifyTasks informs the scheduler about the state of tasks (either new
	// tasks, or states of existing tasks).
	NotifyTasks(ctx context.Context, in *NotifyTasksRequest, opts ...grpc.CallOption) (*NotifyTasksResponse, error)
	// GetCallbacks asks the scheduler for a set of request ids that the
	// external scheduler wants to receive callback NotifyTasks calls about.
	GetCallbacks(ctx context.Context, in *GetCallbacksRequest, opts ...grpc.CallOption) (*GetCallbacksResponse, error)
}

ExternalSchedulerClient is the client API for ExternalScheduler service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewExternalSchedulerPRPCClient

func NewExternalSchedulerPRPCClient(client *prpc.Client) ExternalSchedulerClient

type ExternalSchedulerServer

type ExternalSchedulerServer interface {
	// AssignTasks determines which tasks should be run on which of the supplied
	// idle bots.
	AssignTasks(context.Context, *AssignTasksRequest) (*AssignTasksResponse, error)
	// GetCancellations determines which tasks should be cancelled on which bots.
	GetCancellations(context.Context, *GetCancellationsRequest) (*GetCancellationsResponse, error)
	// NotifyTasks informs the scheduler about the state of tasks (either new
	// tasks, or states of existing tasks).
	NotifyTasks(context.Context, *NotifyTasksRequest) (*NotifyTasksResponse, error)
	// GetCallbacks asks the scheduler for a set of request ids that the
	// external scheduler wants to receive callback NotifyTasks calls about.
	GetCallbacks(context.Context, *GetCallbacksRequest) (*GetCallbacksResponse, error)
}

ExternalSchedulerServer is the server API for ExternalScheduler service.

type GetCallbacksRequest

type GetCallbacksRequest struct {

	// SchedulerID is the id of the scheduler that this request should be run on.
	SchedulerId string `protobuf:"bytes,1,opt,name=scheduler_id,json=schedulerId,proto3" json:"scheduler_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCallbacksRequest) Descriptor deprecated

func (*GetCallbacksRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetCallbacksRequest.ProtoReflect.Descriptor instead.

func (*GetCallbacksRequest) GetSchedulerId

func (x *GetCallbacksRequest) GetSchedulerId() string

func (*GetCallbacksRequest) ProtoMessage

func (*GetCallbacksRequest) ProtoMessage()

func (*GetCallbacksRequest) ProtoReflect

func (x *GetCallbacksRequest) ProtoReflect() protoreflect.Message

func (*GetCallbacksRequest) Reset

func (x *GetCallbacksRequest) Reset()

func (*GetCallbacksRequest) String

func (x *GetCallbacksRequest) String() string

type GetCallbacksResponse

type GetCallbacksResponse struct {

	// TaskIds is the list of tasks that the external scheduler would like
	// callback notifications about.
	TaskIds []string `protobuf:"bytes,1,rep,name=task_ids,json=taskIds,proto3" json:"task_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCallbacksResponse) Descriptor deprecated

func (*GetCallbacksResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetCallbacksResponse.ProtoReflect.Descriptor instead.

func (*GetCallbacksResponse) GetTaskIds

func (x *GetCallbacksResponse) GetTaskIds() []string

func (*GetCallbacksResponse) ProtoMessage

func (*GetCallbacksResponse) ProtoMessage()

func (*GetCallbacksResponse) ProtoReflect

func (x *GetCallbacksResponse) ProtoReflect() protoreflect.Message

func (*GetCallbacksResponse) Reset

func (x *GetCallbacksResponse) Reset()

func (*GetCallbacksResponse) String

func (x *GetCallbacksResponse) String() string

type GetCancellationsRequest

type GetCancellationsRequest struct {

	// SchedulerID is the id of the scheduler that this request should be run on.
	SchedulerId string `protobuf:"bytes,1,opt,name=scheduler_id,json=schedulerId,proto3" json:"scheduler_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCancellationsRequest) Descriptor deprecated

func (*GetCancellationsRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetCancellationsRequest.ProtoReflect.Descriptor instead.

func (*GetCancellationsRequest) GetSchedulerId

func (x *GetCancellationsRequest) GetSchedulerId() string

func (*GetCancellationsRequest) ProtoMessage

func (*GetCancellationsRequest) ProtoMessage()

func (*GetCancellationsRequest) ProtoReflect

func (x *GetCancellationsRequest) ProtoReflect() protoreflect.Message

func (*GetCancellationsRequest) Reset

func (x *GetCancellationsRequest) Reset()

func (*GetCancellationsRequest) String

func (x *GetCancellationsRequest) String() string

func (*GetCancellationsRequest) Validate

func (r *GetCancellationsRequest) Validate() error

Validate returns an error if r is invalid.

type GetCancellationsResponse

type GetCancellationsResponse struct {

	// Cancellations is the set of (bot, task) pairs for tasks that should be
	// cancelled on bots.
	Cancellations []*GetCancellationsResponse_Cancellation `protobuf:"bytes,1,rep,name=cancellations,proto3" json:"cancellations,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCancellationsResponse) Descriptor deprecated

func (*GetCancellationsResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetCancellationsResponse.ProtoReflect.Descriptor instead.

func (*GetCancellationsResponse) GetCancellations

func (*GetCancellationsResponse) ProtoMessage

func (*GetCancellationsResponse) ProtoMessage()

func (*GetCancellationsResponse) ProtoReflect

func (x *GetCancellationsResponse) ProtoReflect() protoreflect.Message

func (*GetCancellationsResponse) Reset

func (x *GetCancellationsResponse) Reset()

func (*GetCancellationsResponse) String

func (x *GetCancellationsResponse) String() string

type GetCancellationsResponse_Cancellation

type GetCancellationsResponse_Cancellation struct {

	// BotID is the bot that a task should be cancelled on.
	BotId string `protobuf:"bytes,1,opt,name=bot_id,json=botId,proto3" json:"bot_id,omitempty"`
	// TaskID is the task that should be cancelled on the bot.
	TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// Reason is the reason the task was cancelled.
	Reason GetCancellationsResponse_Cancellation_Reason `` /* 128-byte string literal not displayed */
	// ExtraInfo is optional, human readable extra information about why the
	// task was cancelled.
	ExtraInfo string `protobuf:"bytes,4,opt,name=extra_info,json=extraInfo,proto3" json:"extra_info,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCancellationsResponse_Cancellation) Descriptor deprecated

func (*GetCancellationsResponse_Cancellation) Descriptor() ([]byte, []int)

Deprecated: Use GetCancellationsResponse_Cancellation.ProtoReflect.Descriptor instead.

func (*GetCancellationsResponse_Cancellation) GetBotId

func (*GetCancellationsResponse_Cancellation) GetExtraInfo

func (*GetCancellationsResponse_Cancellation) GetReason

func (*GetCancellationsResponse_Cancellation) GetTaskId

func (*GetCancellationsResponse_Cancellation) ProtoMessage

func (*GetCancellationsResponse_Cancellation) ProtoMessage()

func (*GetCancellationsResponse_Cancellation) ProtoReflect

func (*GetCancellationsResponse_Cancellation) Reset

func (*GetCancellationsResponse_Cancellation) String

type GetCancellationsResponse_Cancellation_Reason

type GetCancellationsResponse_Cancellation_Reason int32
const (
	// Invalid reason, do not use.
	GetCancellationsResponse_Cancellation_INVALID GetCancellationsResponse_Cancellation_Reason = 0
	// Task was running on a worker, but was interrupted by another task.
	// Task may be retried by swarming.
	GetCancellationsResponse_Cancellation_PREEMPTED GetCancellationsResponse_Cancellation_Reason = 1
	// Task had invalid or erroneous properties that make it not handleable
	// by scheduler. Task should not be retried.
	GetCancellationsResponse_Cancellation_ERROR GetCancellationsResponse_Cancellation_Reason = 2
)

func (GetCancellationsResponse_Cancellation_Reason) Descriptor

func (GetCancellationsResponse_Cancellation_Reason) Enum

func (GetCancellationsResponse_Cancellation_Reason) EnumDescriptor deprecated

func (GetCancellationsResponse_Cancellation_Reason) EnumDescriptor() ([]byte, []int)

Deprecated: Use GetCancellationsResponse_Cancellation_Reason.Descriptor instead.

func (GetCancellationsResponse_Cancellation_Reason) Number

func (GetCancellationsResponse_Cancellation_Reason) String

func (GetCancellationsResponse_Cancellation_Reason) Type

type IdleBot

type IdleBot struct {

	// BotId is the id of the bot that is idle.
	BotId string `protobuf:"bytes,1,opt,name=bot_id,json=botId,proto3" json:"bot_id,omitempty"`
	// Dimensions is the dimension set of the idle bot.
	Dimensions []string `protobuf:"bytes,2,rep,name=dimensions,proto3" json:"dimensions,omitempty"`
	// contains filtered or unexported fields
}

func (*IdleBot) Descriptor deprecated

func (*IdleBot) Descriptor() ([]byte, []int)

Deprecated: Use IdleBot.ProtoReflect.Descriptor instead.

func (*IdleBot) GetBotId

func (x *IdleBot) GetBotId() string

func (*IdleBot) GetDimensions

func (x *IdleBot) GetDimensions() []string

func (*IdleBot) ProtoMessage

func (*IdleBot) ProtoMessage()

func (*IdleBot) ProtoReflect

func (x *IdleBot) ProtoReflect() protoreflect.Message

func (*IdleBot) Reset

func (x *IdleBot) Reset()

func (*IdleBot) String

func (x *IdleBot) String() string

type NotifyTasksItem

type NotifyTasksItem struct {

	// Time is the time at which the given task was in the given state.
	Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
	// Task describes a task request and its current state.
	Task *TaskSpec `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyTasksItem) Descriptor deprecated

func (*NotifyTasksItem) Descriptor() ([]byte, []int)

Deprecated: Use NotifyTasksItem.ProtoReflect.Descriptor instead.

func (*NotifyTasksItem) GetTask

func (x *NotifyTasksItem) GetTask() *TaskSpec

func (*NotifyTasksItem) GetTime

func (x *NotifyTasksItem) GetTime() *timestamppb.Timestamp

func (*NotifyTasksItem) ProtoMessage

func (*NotifyTasksItem) ProtoMessage()

func (*NotifyTasksItem) ProtoReflect

func (x *NotifyTasksItem) ProtoReflect() protoreflect.Message

func (*NotifyTasksItem) Reset

func (x *NotifyTasksItem) Reset()

func (*NotifyTasksItem) String

func (x *NotifyTasksItem) String() string

type NotifyTasksRequest

type NotifyTasksRequest struct {

	// SchedulerID is the id of the scheduler that this request should be run on.
	SchedulerId string `protobuf:"bytes,1,opt,name=scheduler_id,json=schedulerId,proto3" json:"scheduler_id,omitempty"`
	// Notifications is the set of task notifications to send to the scheduler.
	Notifications []*NotifyTasksItem `protobuf:"bytes,2,rep,name=notifications,proto3" json:"notifications,omitempty"`
	// IsCallback specifies whether these notifications are in response to
	// updates that were requested by a previous GetCallbacks call.
	//
	// This is for diagnostic purposes only.
	IsCallback bool `protobuf:"varint,3,opt,name=is_callback,json=isCallback,proto3" json:"is_callback,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyTasksRequest) Descriptor deprecated

func (*NotifyTasksRequest) Descriptor() ([]byte, []int)

Deprecated: Use NotifyTasksRequest.ProtoReflect.Descriptor instead.

func (*NotifyTasksRequest) GetIsCallback

func (x *NotifyTasksRequest) GetIsCallback() bool

func (*NotifyTasksRequest) GetNotifications

func (x *NotifyTasksRequest) GetNotifications() []*NotifyTasksItem

func (*NotifyTasksRequest) GetSchedulerId

func (x *NotifyTasksRequest) GetSchedulerId() string

func (*NotifyTasksRequest) ProtoMessage

func (*NotifyTasksRequest) ProtoMessage()

func (*NotifyTasksRequest) ProtoReflect

func (x *NotifyTasksRequest) ProtoReflect() protoreflect.Message

func (*NotifyTasksRequest) Reset

func (x *NotifyTasksRequest) Reset()

func (*NotifyTasksRequest) String

func (x *NotifyTasksRequest) String() string

func (*NotifyTasksRequest) Validate

func (r *NotifyTasksRequest) Validate() error

Validate returns an error if r is invalid.

type NotifyTasksResponse

type NotifyTasksResponse struct {
	// contains filtered or unexported fields
}

func (*NotifyTasksResponse) Descriptor deprecated

func (*NotifyTasksResponse) Descriptor() ([]byte, []int)

Deprecated: Use NotifyTasksResponse.ProtoReflect.Descriptor instead.

func (*NotifyTasksResponse) ProtoMessage

func (*NotifyTasksResponse) ProtoMessage()

func (*NotifyTasksResponse) ProtoReflect

func (x *NotifyTasksResponse) ProtoReflect() protoreflect.Message

func (*NotifyTasksResponse) Reset

func (x *NotifyTasksResponse) Reset()

func (*NotifyTasksResponse) String

func (x *NotifyTasksResponse) String() string

type SliceSpec

type SliceSpec struct {

	// Dimensions is set dimension strings for this slice.
	Dimensions []string `protobuf:"bytes,1,rep,name=dimensions,proto3" json:"dimensions,omitempty"`
	// contains filtered or unexported fields
}

SliceSpec describes a task request slice, for the purposes of TaskSpec.

func (*SliceSpec) Descriptor deprecated

func (*SliceSpec) Descriptor() ([]byte, []int)

Deprecated: Use SliceSpec.ProtoReflect.Descriptor instead.

func (*SliceSpec) GetDimensions

func (x *SliceSpec) GetDimensions() []string

func (*SliceSpec) ProtoMessage

func (*SliceSpec) ProtoMessage()

func (*SliceSpec) ProtoReflect

func (x *SliceSpec) ProtoReflect() protoreflect.Message

func (*SliceSpec) Reset

func (x *SliceSpec) Reset()

func (*SliceSpec) String

func (x *SliceSpec) String() string

type TaskAssignment

type TaskAssignment struct {

	// BotID is the bot that should be assigned a task.
	BotId string `protobuf:"bytes,1,opt,name=bot_id,json=botId,proto3" json:"bot_id,omitempty"`
	// TaskID is the task that should be assigned to the bot.
	TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// SliceNumber is the slice within the task that should be assigned to the bot.
	// If absent, slice 0 will be assumed.
	SliceNumber int32 `protobuf:"varint,3,opt,name=slice_number,json=sliceNumber,proto3" json:"slice_number,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskAssignment) Descriptor deprecated

func (*TaskAssignment) Descriptor() ([]byte, []int)

Deprecated: Use TaskAssignment.ProtoReflect.Descriptor instead.

func (*TaskAssignment) GetBotId

func (x *TaskAssignment) GetBotId() string

func (*TaskAssignment) GetSliceNumber

func (x *TaskAssignment) GetSliceNumber() int32

func (*TaskAssignment) GetTaskId

func (x *TaskAssignment) GetTaskId() string

func (*TaskAssignment) ProtoMessage

func (*TaskAssignment) ProtoMessage()

func (*TaskAssignment) ProtoReflect

func (x *TaskAssignment) ProtoReflect() protoreflect.Message

func (*TaskAssignment) Reset

func (x *TaskAssignment) Reset()

func (*TaskAssignment) String

func (x *TaskAssignment) String() string

type TaskSpec

type TaskSpec struct {

	// Id is the swarming task request ID.
	//
	// Other than being a unique string to track the lifecycle of this request,
	// it is opaque to external scheduler. By convention, swarming uses a task's
	// summary ID (trailing '0') here, not the run ID.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Tags is the list of tags applied to this task request.
	Tags []string `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"`
	// Slices is the set of task slices for this spec. A TaskSpec must contain
	// at least 1 slice.
	Slices []*SliceSpec `protobuf:"bytes,3,rep,name=slices,proto3" json:"slices,omitempty"`
	// State is the current state of this task.
	State TaskSpec_State `protobuf:"varint,4,opt,name=state,proto3,enum=swarming.v1.TaskSpec_State" json:"state,omitempty"`
	// BotID is the id of the bot that this task is running on. It is only
	// valid if state=RUNNING.
	BotId string `protobuf:"bytes,5,opt,name=bot_id,json=botId,proto3" json:"bot_id,omitempty"`
	// EnqueuedTime is the time at which a task was enqueued. It is only valid
	// if state=PENDING.
	EnqueuedTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=enqueued_time,json=enqueuedTime,proto3" json:"enqueued_time,omitempty"`
	// contains filtered or unexported fields
}

TaskSpec describes a task request and its state, for the purposes of the external scheduler API.

It intentionally elides aspects of a task request that are irrelevant to scheduling decisions, to keep this proto small for performance reasons.

This message format is in its early stages, and may be subject to frequent or even breaking changes as the external scheduler API is rolled out.

func (*TaskSpec) Descriptor deprecated

func (*TaskSpec) Descriptor() ([]byte, []int)

Deprecated: Use TaskSpec.ProtoReflect.Descriptor instead.

func (*TaskSpec) GetBotId

func (x *TaskSpec) GetBotId() string

func (*TaskSpec) GetEnqueuedTime

func (x *TaskSpec) GetEnqueuedTime() *timestamppb.Timestamp

func (*TaskSpec) GetId

func (x *TaskSpec) GetId() string

func (*TaskSpec) GetSlices

func (x *TaskSpec) GetSlices() []*SliceSpec

func (*TaskSpec) GetState

func (x *TaskSpec) GetState() TaskSpec_State

func (*TaskSpec) GetTags

func (x *TaskSpec) GetTags() []string

func (*TaskSpec) ProtoMessage

func (*TaskSpec) ProtoMessage()

func (*TaskSpec) ProtoReflect

func (x *TaskSpec) ProtoReflect() protoreflect.Message

func (*TaskSpec) Reset

func (x *TaskSpec) Reset()

func (*TaskSpec) String

func (x *TaskSpec) String() string

type TaskSpec_State

type TaskSpec_State int32

Represents the different possible states for a TaskSpec.

const (
	// Invalid task state.
	TaskSpec_TASK_STATE_INVALID TaskSpec_State = 0
	// The task is currently pending.
	TaskSpec_PENDING TaskSpec_State = 16
	// Unused.
	TaskSpec_PENDING_DEDUPING TaskSpec_State = 17
	// The task is currently running.
	TaskSpec_RUNNING TaskSpec_State = 32
	// Unused.
	TaskSpec_RUNNING_OVERHEAD_SETUP TaskSpec_State = 33
	// Unused.
	TaskSpec_RUNNING_OVERHEAD_TEARDOWN TaskSpec_State = 34
	// Unused.
	TaskSpec_TERMINATING TaskSpec_State = 35
	// Unused.
	TaskSpec_COMPLETING TaskSpec_State = 47
	// The task ran but the bot had an internal failure.
	TaskSpec_RAN_INTERNAL_FAILURE TaskSpec_State = 48
	// Unused.
	TaskSpec_DUT_FAILURE TaskSpec_State = 49
	// Unused.
	TaskSpec_BOT_DISAPPEARED TaskSpec_State = 50
	// Unused.
	TaskSpec_PREEMPTED TaskSpec_State = 51
	// The task ran and completed normally.
	TaskSpec_COMPLETED TaskSpec_State = 64
	// The task ran for longer than the allowed time.
	TaskSpec_TIMED_OUT TaskSpec_State = 65
	// Unused.
	TaskSpec_TIMED_OUT_SILENCE TaskSpec_State = 66
	// The task ran but was manually killed via the 'cancel' API.
	TaskSpec_KILLED TaskSpec_State = 67
	// Unused.
	TaskSpec_MISSING_INPUTS TaskSpec_State = 68
	// The task didn't have to run, because a previous task had results.
	TaskSpec_DEDUPED TaskSpec_State = 80
	// The task is not pending anymore; it never ran due to lack of capacity.
	TaskSpec_EXPIRED TaskSpec_State = 81
	// The task never ran, and was manually cancelled via the 'cancel' API.
	TaskSpec_CANCELED TaskSpec_State = 82
	// The task was never set to PENDING and was immediately refused.
	TaskSpec_NO_RESOURCE TaskSpec_State = 83
	// Unused.
	TaskSpec_LOAD_SHED TaskSpec_State = 84
	// Unused.
	TaskSpec_RESOURCE_EXHAUSTED TaskSpec_State = 85
	// Unused.
	TaskSpec_SKIPPED_INTERNAL_FAILURE TaskSpec_State = 86
	// The task encountered an error caused by the client.
	TaskSpec_CLIENT_ERROR TaskSpec_State = 87
)

func (TaskSpec_State) Descriptor

func (TaskSpec_State) Enum

func (x TaskSpec_State) Enum() *TaskSpec_State

func (TaskSpec_State) EnumDescriptor deprecated

func (TaskSpec_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use TaskSpec_State.Descriptor instead.

func (TaskSpec_State) Number

func (TaskSpec_State) String

func (x TaskSpec_State) String() string

func (TaskSpec_State) Type

type TaskSpec_StateCategory

type TaskSpec_StateCategory int32

Represents the 5 different categories of task state.

const (
	// Invalid value.
	TaskSpec_TASK_STATE_CATEGORY_UNSPECIFIED TaskSpec_StateCategory = 0
	// Bit mask for the State inside each category.
	TaskSpec_TASK_STATE_MASK TaskSpec_StateCategory = 15
	// The task is enqueued and pending bot availability.
	TaskSpec_CATEGORY_PENDING TaskSpec_StateCategory = 16
	// The task is running.
	TaskSpec_CATEGORY_RUNNING TaskSpec_StateCategory = 32
	// Transient done states are uncertain states.
	TaskSpec_CATEGORY_TRANSIENT_DONE TaskSpec_StateCategory = 48
	// The task ran, and it is done.
	TaskSpec_CATEGORY_EXECUTION_DONE TaskSpec_StateCategory = 64
	// The task did not run, and won't.
	TaskSpec_CATEGORY_NEVER_RAN_DONE TaskSpec_StateCategory = 80
)

func (TaskSpec_StateCategory) Descriptor

func (TaskSpec_StateCategory) Enum

func (TaskSpec_StateCategory) EnumDescriptor deprecated

func (TaskSpec_StateCategory) EnumDescriptor() ([]byte, []int)

Deprecated: Use TaskSpec_StateCategory.Descriptor instead.

func (TaskSpec_StateCategory) Number

func (TaskSpec_StateCategory) String

func (x TaskSpec_StateCategory) String() string

func (TaskSpec_StateCategory) Type

type UnimplementedExternalSchedulerServer

type UnimplementedExternalSchedulerServer struct {
}

UnimplementedExternalSchedulerServer can be embedded to have forward compatible implementations.

func (*UnimplementedExternalSchedulerServer) AssignTasks

func (*UnimplementedExternalSchedulerServer) GetCallbacks

func (*UnimplementedExternalSchedulerServer) GetCancellations

func (*UnimplementedExternalSchedulerServer) NotifyTasks

Jump to

Keyboard shortcuts

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