blob: d6b72f57087adf3b2a9d33256182ea12ac905441 [file] [log] [blame]
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: go.chromium.org/luci/swarming/proto/api/plugin.proto
package apipb
import prpc "go.chromium.org/luci/grpc/prpc"
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
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
)
var GetCancellationsResponse_Cancellation_Reason_name = map[int32]string{
0: "INVALID",
1: "PREEMPTED",
2: "ERROR",
}
var GetCancellationsResponse_Cancellation_Reason_value = map[string]int32{
"INVALID": 0,
"PREEMPTED": 1,
"ERROR": 2,
}
func (x GetCancellationsResponse_Cancellation_Reason) String() string {
return proto.EnumName(GetCancellationsResponse_Cancellation_Reason_name, int32(x))
}
func (GetCancellationsResponse_Cancellation_Reason) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{7, 0, 0}
}
// 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.
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 TaskState `protobuf:"varint,4,opt,name=state,proto3,enum=swarming.v1.TaskState" 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 *timestamp.Timestamp `protobuf:"bytes,6,opt,name=enqueued_time,json=enqueuedTime,proto3" json:"enqueued_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TaskSpec) Reset() { *m = TaskSpec{} }
func (m *TaskSpec) String() string { return proto.CompactTextString(m) }
func (*TaskSpec) ProtoMessage() {}
func (*TaskSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{0}
}
func (m *TaskSpec) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TaskSpec.Unmarshal(m, b)
}
func (m *TaskSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TaskSpec.Marshal(b, m, deterministic)
}
func (m *TaskSpec) XXX_Merge(src proto.Message) {
xxx_messageInfo_TaskSpec.Merge(m, src)
}
func (m *TaskSpec) XXX_Size() int {
return xxx_messageInfo_TaskSpec.Size(m)
}
func (m *TaskSpec) XXX_DiscardUnknown() {
xxx_messageInfo_TaskSpec.DiscardUnknown(m)
}
var xxx_messageInfo_TaskSpec proto.InternalMessageInfo
func (m *TaskSpec) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *TaskSpec) GetTags() []string {
if m != nil {
return m.Tags
}
return nil
}
func (m *TaskSpec) GetSlices() []*SliceSpec {
if m != nil {
return m.Slices
}
return nil
}
func (m *TaskSpec) GetState() TaskState {
if m != nil {
return m.State
}
return TaskState_TASK_STATE_INVALID
}
func (m *TaskSpec) GetBotId() string {
if m != nil {
return m.BotId
}
return ""
}
func (m *TaskSpec) GetEnqueuedTime() *timestamp.Timestamp {
if m != nil {
return m.EnqueuedTime
}
return nil
}
// SliceSpec describes a task request slice, for the purposes of TaskSpec.
type SliceSpec struct {
// Dimensions is set dimension strings for this slice.
Dimensions []string `protobuf:"bytes,1,rep,name=dimensions,proto3" json:"dimensions,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SliceSpec) Reset() { *m = SliceSpec{} }
func (m *SliceSpec) String() string { return proto.CompactTextString(m) }
func (*SliceSpec) ProtoMessage() {}
func (*SliceSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{1}
}
func (m *SliceSpec) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SliceSpec.Unmarshal(m, b)
}
func (m *SliceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SliceSpec.Marshal(b, m, deterministic)
}
func (m *SliceSpec) XXX_Merge(src proto.Message) {
xxx_messageInfo_SliceSpec.Merge(m, src)
}
func (m *SliceSpec) XXX_Size() int {
return xxx_messageInfo_SliceSpec.Size(m)
}
func (m *SliceSpec) XXX_DiscardUnknown() {
xxx_messageInfo_SliceSpec.DiscardUnknown(m)
}
var xxx_messageInfo_SliceSpec proto.InternalMessageInfo
func (m *SliceSpec) GetDimensions() []string {
if m != nil {
return m.Dimensions
}
return nil
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *IdleBot) Reset() { *m = IdleBot{} }
func (m *IdleBot) String() string { return proto.CompactTextString(m) }
func (*IdleBot) ProtoMessage() {}
func (*IdleBot) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{2}
}
func (m *IdleBot) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IdleBot.Unmarshal(m, b)
}
func (m *IdleBot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IdleBot.Marshal(b, m, deterministic)
}
func (m *IdleBot) XXX_Merge(src proto.Message) {
xxx_messageInfo_IdleBot.Merge(m, src)
}
func (m *IdleBot) XXX_Size() int {
return xxx_messageInfo_IdleBot.Size(m)
}
func (m *IdleBot) XXX_DiscardUnknown() {
xxx_messageInfo_IdleBot.DiscardUnknown(m)
}
var xxx_messageInfo_IdleBot proto.InternalMessageInfo
func (m *IdleBot) GetBotId() string {
if m != nil {
return m.BotId
}
return ""
}
func (m *IdleBot) GetDimensions() []string {
if m != nil {
return m.Dimensions
}
return nil
}
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 *timestamp.Timestamp `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AssignTasksRequest) Reset() { *m = AssignTasksRequest{} }
func (m *AssignTasksRequest) String() string { return proto.CompactTextString(m) }
func (*AssignTasksRequest) ProtoMessage() {}
func (*AssignTasksRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{3}
}
func (m *AssignTasksRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AssignTasksRequest.Unmarshal(m, b)
}
func (m *AssignTasksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AssignTasksRequest.Marshal(b, m, deterministic)
}
func (m *AssignTasksRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AssignTasksRequest.Merge(m, src)
}
func (m *AssignTasksRequest) XXX_Size() int {
return xxx_messageInfo_AssignTasksRequest.Size(m)
}
func (m *AssignTasksRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AssignTasksRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AssignTasksRequest proto.InternalMessageInfo
func (m *AssignTasksRequest) GetSchedulerId() string {
if m != nil {
return m.SchedulerId
}
return ""
}
func (m *AssignTasksRequest) GetIdleBots() []*IdleBot {
if m != nil {
return m.IdleBots
}
return nil
}
func (m *AssignTasksRequest) GetTime() *timestamp.Timestamp {
if m != nil {
return m.Time
}
return nil
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AssignTasksResponse) Reset() { *m = AssignTasksResponse{} }
func (m *AssignTasksResponse) String() string { return proto.CompactTextString(m) }
func (*AssignTasksResponse) ProtoMessage() {}
func (*AssignTasksResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{4}
}
func (m *AssignTasksResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AssignTasksResponse.Unmarshal(m, b)
}
func (m *AssignTasksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AssignTasksResponse.Marshal(b, m, deterministic)
}
func (m *AssignTasksResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AssignTasksResponse.Merge(m, src)
}
func (m *AssignTasksResponse) XXX_Size() int {
return xxx_messageInfo_AssignTasksResponse.Size(m)
}
func (m *AssignTasksResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AssignTasksResponse.DiscardUnknown(m)
}
var xxx_messageInfo_AssignTasksResponse proto.InternalMessageInfo
func (m *AssignTasksResponse) GetAssignments() []*TaskAssignment {
if m != nil {
return m.Assignments
}
return nil
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TaskAssignment) Reset() { *m = TaskAssignment{} }
func (m *TaskAssignment) String() string { return proto.CompactTextString(m) }
func (*TaskAssignment) ProtoMessage() {}
func (*TaskAssignment) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{5}
}
func (m *TaskAssignment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TaskAssignment.Unmarshal(m, b)
}
func (m *TaskAssignment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TaskAssignment.Marshal(b, m, deterministic)
}
func (m *TaskAssignment) XXX_Merge(src proto.Message) {
xxx_messageInfo_TaskAssignment.Merge(m, src)
}
func (m *TaskAssignment) XXX_Size() int {
return xxx_messageInfo_TaskAssignment.Size(m)
}
func (m *TaskAssignment) XXX_DiscardUnknown() {
xxx_messageInfo_TaskAssignment.DiscardUnknown(m)
}
var xxx_messageInfo_TaskAssignment proto.InternalMessageInfo
func (m *TaskAssignment) GetBotId() string {
if m != nil {
return m.BotId
}
return ""
}
func (m *TaskAssignment) GetTaskId() string {
if m != nil {
return m.TaskId
}
return ""
}
func (m *TaskAssignment) GetSliceNumber() int32 {
if m != nil {
return m.SliceNumber
}
return 0
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetCancellationsRequest) Reset() { *m = GetCancellationsRequest{} }
func (m *GetCancellationsRequest) String() string { return proto.CompactTextString(m) }
func (*GetCancellationsRequest) ProtoMessage() {}
func (*GetCancellationsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{6}
}
func (m *GetCancellationsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetCancellationsRequest.Unmarshal(m, b)
}
func (m *GetCancellationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetCancellationsRequest.Marshal(b, m, deterministic)
}
func (m *GetCancellationsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetCancellationsRequest.Merge(m, src)
}
func (m *GetCancellationsRequest) XXX_Size() int {
return xxx_messageInfo_GetCancellationsRequest.Size(m)
}
func (m *GetCancellationsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetCancellationsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetCancellationsRequest proto.InternalMessageInfo
func (m *GetCancellationsRequest) GetSchedulerId() string {
if m != nil {
return m.SchedulerId
}
return ""
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetCancellationsResponse) Reset() { *m = GetCancellationsResponse{} }
func (m *GetCancellationsResponse) String() string { return proto.CompactTextString(m) }
func (*GetCancellationsResponse) ProtoMessage() {}
func (*GetCancellationsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{7}
}
func (m *GetCancellationsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetCancellationsResponse.Unmarshal(m, b)
}
func (m *GetCancellationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetCancellationsResponse.Marshal(b, m, deterministic)
}
func (m *GetCancellationsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetCancellationsResponse.Merge(m, src)
}
func (m *GetCancellationsResponse) XXX_Size() int {
return xxx_messageInfo_GetCancellationsResponse.Size(m)
}
func (m *GetCancellationsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetCancellationsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetCancellationsResponse proto.InternalMessageInfo
func (m *GetCancellationsResponse) GetCancellations() []*GetCancellationsResponse_Cancellation {
if m != nil {
return m.Cancellations
}
return nil
}
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 `protobuf:"varint,3,opt,name=reason,proto3,enum=swarming.v1.GetCancellationsResponse_Cancellation_Reason" json:"reason,omitempty"`
// 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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetCancellationsResponse_Cancellation) Reset() { *m = GetCancellationsResponse_Cancellation{} }
func (m *GetCancellationsResponse_Cancellation) String() string { return proto.CompactTextString(m) }
func (*GetCancellationsResponse_Cancellation) ProtoMessage() {}
func (*GetCancellationsResponse_Cancellation) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{7, 0}
}
func (m *GetCancellationsResponse_Cancellation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetCancellationsResponse_Cancellation.Unmarshal(m, b)
}
func (m *GetCancellationsResponse_Cancellation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetCancellationsResponse_Cancellation.Marshal(b, m, deterministic)
}
func (m *GetCancellationsResponse_Cancellation) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetCancellationsResponse_Cancellation.Merge(m, src)
}
func (m *GetCancellationsResponse_Cancellation) XXX_Size() int {
return xxx_messageInfo_GetCancellationsResponse_Cancellation.Size(m)
}
func (m *GetCancellationsResponse_Cancellation) XXX_DiscardUnknown() {
xxx_messageInfo_GetCancellationsResponse_Cancellation.DiscardUnknown(m)
}
var xxx_messageInfo_GetCancellationsResponse_Cancellation proto.InternalMessageInfo
func (m *GetCancellationsResponse_Cancellation) GetBotId() string {
if m != nil {
return m.BotId
}
return ""
}
func (m *GetCancellationsResponse_Cancellation) GetTaskId() string {
if m != nil {
return m.TaskId
}
return ""
}
func (m *GetCancellationsResponse_Cancellation) GetReason() GetCancellationsResponse_Cancellation_Reason {
if m != nil {
return m.Reason
}
return GetCancellationsResponse_Cancellation_INVALID
}
func (m *GetCancellationsResponse_Cancellation) GetExtraInfo() string {
if m != nil {
return m.ExtraInfo
}
return ""
}
type NotifyTasksItem struct {
// Time is the time at which the given task was in the given state.
Time *timestamp.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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NotifyTasksItem) Reset() { *m = NotifyTasksItem{} }
func (m *NotifyTasksItem) String() string { return proto.CompactTextString(m) }
func (*NotifyTasksItem) ProtoMessage() {}
func (*NotifyTasksItem) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{8}
}
func (m *NotifyTasksItem) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NotifyTasksItem.Unmarshal(m, b)
}
func (m *NotifyTasksItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NotifyTasksItem.Marshal(b, m, deterministic)
}
func (m *NotifyTasksItem) XXX_Merge(src proto.Message) {
xxx_messageInfo_NotifyTasksItem.Merge(m, src)
}
func (m *NotifyTasksItem) XXX_Size() int {
return xxx_messageInfo_NotifyTasksItem.Size(m)
}
func (m *NotifyTasksItem) XXX_DiscardUnknown() {
xxx_messageInfo_NotifyTasksItem.DiscardUnknown(m)
}
var xxx_messageInfo_NotifyTasksItem proto.InternalMessageInfo
func (m *NotifyTasksItem) GetTime() *timestamp.Timestamp {
if m != nil {
return m.Time
}
return nil
}
func (m *NotifyTasksItem) GetTask() *TaskSpec {
if m != nil {
return m.Task
}
return nil
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NotifyTasksRequest) Reset() { *m = NotifyTasksRequest{} }
func (m *NotifyTasksRequest) String() string { return proto.CompactTextString(m) }
func (*NotifyTasksRequest) ProtoMessage() {}
func (*NotifyTasksRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{9}
}
func (m *NotifyTasksRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NotifyTasksRequest.Unmarshal(m, b)
}
func (m *NotifyTasksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NotifyTasksRequest.Marshal(b, m, deterministic)
}
func (m *NotifyTasksRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_NotifyTasksRequest.Merge(m, src)
}
func (m *NotifyTasksRequest) XXX_Size() int {
return xxx_messageInfo_NotifyTasksRequest.Size(m)
}
func (m *NotifyTasksRequest) XXX_DiscardUnknown() {
xxx_messageInfo_NotifyTasksRequest.DiscardUnknown(m)
}
var xxx_messageInfo_NotifyTasksRequest proto.InternalMessageInfo
func (m *NotifyTasksRequest) GetSchedulerId() string {
if m != nil {
return m.SchedulerId
}
return ""
}
func (m *NotifyTasksRequest) GetNotifications() []*NotifyTasksItem {
if m != nil {
return m.Notifications
}
return nil
}
func (m *NotifyTasksRequest) GetIsCallback() bool {
if m != nil {
return m.IsCallback
}
return false
}
type NotifyTasksResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NotifyTasksResponse) Reset() { *m = NotifyTasksResponse{} }
func (m *NotifyTasksResponse) String() string { return proto.CompactTextString(m) }
func (*NotifyTasksResponse) ProtoMessage() {}
func (*NotifyTasksResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{10}
}
func (m *NotifyTasksResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NotifyTasksResponse.Unmarshal(m, b)
}
func (m *NotifyTasksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NotifyTasksResponse.Marshal(b, m, deterministic)
}
func (m *NotifyTasksResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_NotifyTasksResponse.Merge(m, src)
}
func (m *NotifyTasksResponse) XXX_Size() int {
return xxx_messageInfo_NotifyTasksResponse.Size(m)
}
func (m *NotifyTasksResponse) XXX_DiscardUnknown() {
xxx_messageInfo_NotifyTasksResponse.DiscardUnknown(m)
}
var xxx_messageInfo_NotifyTasksResponse proto.InternalMessageInfo
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetCallbacksRequest) Reset() { *m = GetCallbacksRequest{} }
func (m *GetCallbacksRequest) String() string { return proto.CompactTextString(m) }
func (*GetCallbacksRequest) ProtoMessage() {}
func (*GetCallbacksRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{11}
}
func (m *GetCallbacksRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetCallbacksRequest.Unmarshal(m, b)
}
func (m *GetCallbacksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetCallbacksRequest.Marshal(b, m, deterministic)
}
func (m *GetCallbacksRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetCallbacksRequest.Merge(m, src)
}
func (m *GetCallbacksRequest) XXX_Size() int {
return xxx_messageInfo_GetCallbacksRequest.Size(m)
}
func (m *GetCallbacksRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetCallbacksRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetCallbacksRequest proto.InternalMessageInfo
func (m *GetCallbacksRequest) GetSchedulerId() string {
if m != nil {
return m.SchedulerId
}
return ""
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetCallbacksResponse) Reset() { *m = GetCallbacksResponse{} }
func (m *GetCallbacksResponse) String() string { return proto.CompactTextString(m) }
func (*GetCallbacksResponse) ProtoMessage() {}
func (*GetCallbacksResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_50a0efb5b206d6dd, []int{12}
}
func (m *GetCallbacksResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetCallbacksResponse.Unmarshal(m, b)
}
func (m *GetCallbacksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetCallbacksResponse.Marshal(b, m, deterministic)
}
func (m *GetCallbacksResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetCallbacksResponse.Merge(m, src)
}
func (m *GetCallbacksResponse) XXX_Size() int {
return xxx_messageInfo_GetCallbacksResponse.Size(m)
}
func (m *GetCallbacksResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetCallbacksResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetCallbacksResponse proto.InternalMessageInfo
func (m *GetCallbacksResponse) GetTaskIds() []string {
if m != nil {
return m.TaskIds
}
return nil
}
func init() {
proto.RegisterEnum("swarming.v1.GetCancellationsResponse_Cancellation_Reason", GetCancellationsResponse_Cancellation_Reason_name, GetCancellationsResponse_Cancellation_Reason_value)
proto.RegisterType((*TaskSpec)(nil), "swarming.v1.TaskSpec")
proto.RegisterType((*SliceSpec)(nil), "swarming.v1.SliceSpec")
proto.RegisterType((*IdleBot)(nil), "swarming.v1.IdleBot")
proto.RegisterType((*AssignTasksRequest)(nil), "swarming.v1.AssignTasksRequest")
proto.RegisterType((*AssignTasksResponse)(nil), "swarming.v1.AssignTasksResponse")
proto.RegisterType((*TaskAssignment)(nil), "swarming.v1.TaskAssignment")
proto.RegisterType((*GetCancellationsRequest)(nil), "swarming.v1.GetCancellationsRequest")
proto.RegisterType((*GetCancellationsResponse)(nil), "swarming.v1.GetCancellationsResponse")
proto.RegisterType((*GetCancellationsResponse_Cancellation)(nil), "swarming.v1.GetCancellationsResponse.Cancellation")
proto.RegisterType((*NotifyTasksItem)(nil), "swarming.v1.NotifyTasksItem")
proto.RegisterType((*NotifyTasksRequest)(nil), "swarming.v1.NotifyTasksRequest")
proto.RegisterType((*NotifyTasksResponse)(nil), "swarming.v1.NotifyTasksResponse")
proto.RegisterType((*GetCallbacksRequest)(nil), "swarming.v1.GetCallbacksRequest")
proto.RegisterType((*GetCallbacksResponse)(nil), "swarming.v1.GetCallbacksResponse")
}
func init() {
proto.RegisterFile("go.chromium.org/luci/swarming/proto/api/plugin.proto", fileDescriptor_50a0efb5b206d6dd)
}
var fileDescriptor_50a0efb5b206d6dd = []byte{
// 804 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x5d, 0x6f, 0xe3, 0x44,
0x14, 0xc5, 0x6e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0xc2, 0x49, 0x3b, 0x4d, 0x34, 0xda, 0x36, 0xd2, 0x6d, 0xd1,
0xf0, 0xd1, 0xff, 0x30, 0x6a, 0xd1, 0x1b, 0xf7, 0xa7, 0x0f, 0x76, 0xfc, 0x07, 0xfe, 0x8c, 0xe4,
0x2c, 0x0f, 0x82, 0xbe, 0x02, 0x3e, 0xfc, 0x27, 0x00, 0x00, 0xff, 0xff, 0xae, 0x38, 0xe6, 0xbd,
0x1d, 0x08, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// 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.
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)
}
type externalSchedulerPRPCClient struct {
client *prpc.Client
}
func NewExternalSchedulerPRPCClient(client *prpc.Client) ExternalSchedulerClient {
return &externalSchedulerPRPCClient{client}
}
func (c *externalSchedulerPRPCClient) AssignTasks(ctx context.Context, in *AssignTasksRequest, opts ...grpc.CallOption) (*AssignTasksResponse, error) {
out := new(AssignTasksResponse)
err := c.client.Call(ctx, "swarming.v1.ExternalScheduler", "AssignTasks", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *externalSchedulerPRPCClient) GetCancellations(ctx context.Context, in *GetCancellationsRequest, opts ...grpc.CallOption) (*GetCancellationsResponse, error) {
out := new(GetCancellationsResponse)
err := c.client.Call(ctx, "swarming.v1.ExternalScheduler", "GetCancellations", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *externalSchedulerPRPCClient) NotifyTasks(ctx context.Context, in *NotifyTasksRequest, opts ...grpc.CallOption) (*NotifyTasksResponse, error) {
out := new(NotifyTasksResponse)
err := c.client.Call(ctx, "swarming.v1.ExternalScheduler", "NotifyTasks", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *externalSchedulerPRPCClient) GetCallbacks(ctx context.Context, in *GetCallbacksRequest, opts ...grpc.CallOption) (*GetCallbacksResponse, error) {
out := new(GetCallbacksResponse)
err := c.client.Call(ctx, "swarming.v1.ExternalScheduler", "GetCallbacks", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
type externalSchedulerClient struct {
cc *grpc.ClientConn
}
func NewExternalSchedulerClient(cc *grpc.ClientConn) ExternalSchedulerClient {
return &externalSchedulerClient{cc}
}
func (c *externalSchedulerClient) AssignTasks(ctx context.Context, in *AssignTasksRequest, opts ...grpc.CallOption) (*AssignTasksResponse, error) {
out := new(AssignTasksResponse)
err := c.cc.Invoke(ctx, "/swarming.v1.ExternalScheduler/AssignTasks", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *externalSchedulerClient) GetCancellations(ctx context.Context, in *GetCancellationsRequest, opts ...grpc.CallOption) (*GetCancellationsResponse, error) {
out := new(GetCancellationsResponse)
err := c.cc.Invoke(ctx, "/swarming.v1.ExternalScheduler/GetCancellations", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *externalSchedulerClient) NotifyTasks(ctx context.Context, in *NotifyTasksRequest, opts ...grpc.CallOption) (*NotifyTasksResponse, error) {
out := new(NotifyTasksResponse)
err := c.cc.Invoke(ctx, "/swarming.v1.ExternalScheduler/NotifyTasks", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *externalSchedulerClient) GetCallbacks(ctx context.Context, in *GetCallbacksRequest, opts ...grpc.CallOption) (*GetCallbacksResponse, error) {
out := new(GetCallbacksResponse)
err := c.cc.Invoke(ctx, "/swarming.v1.ExternalScheduler/GetCallbacks", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ExternalSchedulerServer is the server API for ExternalScheduler service.
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)
}
// UnimplementedExternalSchedulerServer can be embedded to have forward compatible implementations.
type UnimplementedExternalSchedulerServer struct {
}
func (*UnimplementedExternalSchedulerServer) AssignTasks(ctx context.Context, req *AssignTasksRequest) (*AssignTasksResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AssignTasks not implemented")
}
func (*UnimplementedExternalSchedulerServer) GetCancellations(ctx context.Context, req *GetCancellationsRequest) (*GetCancellationsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCancellations not implemented")
}
func (*UnimplementedExternalSchedulerServer) NotifyTasks(ctx context.Context, req *NotifyTasksRequest) (*NotifyTasksResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NotifyTasks not implemented")
}
func (*UnimplementedExternalSchedulerServer) GetCallbacks(ctx context.Context, req *GetCallbacksRequest) (*GetCallbacksResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCallbacks not implemented")
}
func RegisterExternalSchedulerServer(s prpc.Registrar, srv ExternalSchedulerServer) {
s.RegisterService(&_ExternalScheduler_serviceDesc, srv)
}
func _ExternalScheduler_AssignTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AssignTasksRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExternalSchedulerServer).AssignTasks(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/swarming.v1.ExternalScheduler/AssignTasks",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExternalSchedulerServer).AssignTasks(ctx, req.(*AssignTasksRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ExternalScheduler_GetCancellations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCancellationsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExternalSchedulerServer).GetCancellations(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/swarming.v1.ExternalScheduler/GetCancellations",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExternalSchedulerServer).GetCancellations(ctx, req.(*GetCancellationsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ExternalScheduler_NotifyTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NotifyTasksRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExternalSchedulerServer).NotifyTasks(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/swarming.v1.ExternalScheduler/NotifyTasks",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExternalSchedulerServer).NotifyTasks(ctx, req.(*NotifyTasksRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ExternalScheduler_GetCallbacks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCallbacksRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExternalSchedulerServer).GetCallbacks(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/swarming.v1.ExternalScheduler/GetCallbacks",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExternalSchedulerServer).GetCallbacks(ctx, req.(*GetCallbacksRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ExternalScheduler_serviceDesc = grpc.ServiceDesc{
ServiceName: "swarming.v1.ExternalScheduler",
HandlerType: (*ExternalSchedulerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AssignTasks",
Handler: _ExternalScheduler_AssignTasks_Handler,
},
{
MethodName: "GetCancellations",
Handler: _ExternalScheduler_GetCancellations_Handler,
},
{
MethodName: "NotifyTasks",
Handler: _ExternalScheduler_NotifyTasks_Handler,
},
{
MethodName: "GetCallbacks",
Handler: _ExternalScheduler_GetCallbacks_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "go.chromium.org/luci/swarming/proto/api/plugin.proto",
}