scheduler

package
v0.0.0-...-4a11b79 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package scheduler contains the main API of Scheduler service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileDescriptorSet

func FileDescriptorSet() *descriptor.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 RegisterSchedulerServer

func RegisterSchedulerServer(s prpc.Registrar, srv SchedulerServer)

Types

type BuildbucketTrigger

type BuildbucketTrigger struct {
	Properties           *_struct.Struct `protobuf:"bytes,1,opt,name=properties,proto3" json:"properties,omitempty"`
	Tags                 []string        `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

BuildbucketTrigger is emitted by sources that request a build and consumed by Buildbucket tasks.

The trigger contains information to pass to the new Buildbucket build.

Note: what builds to trigger is specified separately, either in the job configuration (when one job triggers another) or via the API request parameters (when triggering through public API).

func (*BuildbucketTrigger) Descriptor

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

func (*BuildbucketTrigger) GetProperties

func (m *BuildbucketTrigger) GetProperties() *_struct.Struct

func (*BuildbucketTrigger) GetTags

func (m *BuildbucketTrigger) GetTags() []string

func (*BuildbucketTrigger) ProtoMessage

func (*BuildbucketTrigger) ProtoMessage()

func (*BuildbucketTrigger) Reset

func (m *BuildbucketTrigger) Reset()

func (*BuildbucketTrigger) String

func (m *BuildbucketTrigger) String() string

func (*BuildbucketTrigger) XXX_DiscardUnknown

func (m *BuildbucketTrigger) XXX_DiscardUnknown()

func (*BuildbucketTrigger) XXX_Marshal

func (m *BuildbucketTrigger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BuildbucketTrigger) XXX_Merge

func (m *BuildbucketTrigger) XXX_Merge(src proto.Message)

func (*BuildbucketTrigger) XXX_Size

func (m *BuildbucketTrigger) XXX_Size() int

func (*BuildbucketTrigger) XXX_Unmarshal

func (m *BuildbucketTrigger) XXX_Unmarshal(b []byte) error

type CronTrigger

type CronTrigger struct {
	Generation           int64    `protobuf:"varint,1,opt,name=generation,proto3" json:"generation,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

CronTrigger is used internally by Scheduler to implement periodic jobs.

It is emitted by the cron state machines whenever it decides the scheduler should launch the invocation.

Note: such triggers can't be scheduled through external Scheduler API. They may appear in the API responses though.

func (*CronTrigger) Descriptor

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

func (*CronTrigger) GetGeneration

func (m *CronTrigger) GetGeneration() int64

func (*CronTrigger) ProtoMessage

func (*CronTrigger) ProtoMessage()

func (*CronTrigger) Reset

func (m *CronTrigger) Reset()

func (*CronTrigger) String

func (m *CronTrigger) String() string

func (*CronTrigger) XXX_DiscardUnknown

func (m *CronTrigger) XXX_DiscardUnknown()

func (*CronTrigger) XXX_Marshal

func (m *CronTrigger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CronTrigger) XXX_Merge

func (m *CronTrigger) XXX_Merge(src proto.Message)

func (*CronTrigger) XXX_Size

func (m *CronTrigger) XXX_Size() int

func (*CronTrigger) XXX_Unmarshal

func (m *CronTrigger) XXX_Unmarshal(b []byte) error

type EmitTriggersRequest

type EmitTriggersRequest struct {
	// A trigger and jobs it should be delivered to.
	//
	// Order is important. Triggers that are listed earlier are considered older.
	Batches []*EmitTriggersRequest_Batch `protobuf:"bytes,1,rep,name=batches,proto3" json:"batches,omitempty"`
	// An optional timestamp to use as trigger creation time, as unix timestamp in
	// microseconds. Assigned by the server by default. If given, must be within
	// +-15 min of the current time.
	//
	// Under some conditions triggers are ordered by timestamp of when they are
	// created. By allowing the client to specify this timestamp, we make
	// EmitTrigger RPC idempotent: if EmitTrigger call fails midway, the caller
	// can retry it providing exact same timestamp to get the correct final order
	// of the triggers.
	Timestamp            int64    `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EmitTriggersRequest) Descriptor

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

func (*EmitTriggersRequest) GetBatches

func (*EmitTriggersRequest) GetTimestamp

func (m *EmitTriggersRequest) GetTimestamp() int64

func (*EmitTriggersRequest) ProtoMessage

func (*EmitTriggersRequest) ProtoMessage()

func (*EmitTriggersRequest) Reset

func (m *EmitTriggersRequest) Reset()

func (*EmitTriggersRequest) String

func (m *EmitTriggersRequest) String() string

func (*EmitTriggersRequest) XXX_DiscardUnknown

func (m *EmitTriggersRequest) XXX_DiscardUnknown()

func (*EmitTriggersRequest) XXX_Marshal

func (m *EmitTriggersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EmitTriggersRequest) XXX_Merge

func (m *EmitTriggersRequest) XXX_Merge(src proto.Message)

func (*EmitTriggersRequest) XXX_Size

func (m *EmitTriggersRequest) XXX_Size() int

func (*EmitTriggersRequest) XXX_Unmarshal

func (m *EmitTriggersRequest) XXX_Unmarshal(b []byte) error

type EmitTriggersRequest_Batch

type EmitTriggersRequest_Batch struct {
	Trigger              *Trigger  `protobuf:"bytes,1,opt,name=trigger,proto3" json:"trigger,omitempty"`
	Jobs                 []*JobRef `protobuf:"bytes,2,rep,name=jobs,proto3" json:"jobs,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*EmitTriggersRequest_Batch) Descriptor

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

func (*EmitTriggersRequest_Batch) GetJobs

func (m *EmitTriggersRequest_Batch) GetJobs() []*JobRef

func (*EmitTriggersRequest_Batch) GetTrigger

func (m *EmitTriggersRequest_Batch) GetTrigger() *Trigger

func (*EmitTriggersRequest_Batch) ProtoMessage

func (*EmitTriggersRequest_Batch) ProtoMessage()

func (*EmitTriggersRequest_Batch) Reset

func (m *EmitTriggersRequest_Batch) Reset()

func (*EmitTriggersRequest_Batch) String

func (m *EmitTriggersRequest_Batch) String() string

func (*EmitTriggersRequest_Batch) XXX_DiscardUnknown

func (m *EmitTriggersRequest_Batch) XXX_DiscardUnknown()

func (*EmitTriggersRequest_Batch) XXX_Marshal

func (m *EmitTriggersRequest_Batch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EmitTriggersRequest_Batch) XXX_Merge

func (m *EmitTriggersRequest_Batch) XXX_Merge(src proto.Message)

func (*EmitTriggersRequest_Batch) XXX_Size

func (m *EmitTriggersRequest_Batch) XXX_Size() int

func (*EmitTriggersRequest_Batch) XXX_Unmarshal

func (m *EmitTriggersRequest_Batch) XXX_Unmarshal(b []byte) error

type GitilesTrigger

type GitilesTrigger struct {
	Repo                 string   `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
	Ref                  string   `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"`
	Revision             string   `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GitilesTrigger is emitted by sources that watch Gitiles and consumed by Buildbucket tasks.

Such triggers are emitted whenever the repository state changes.

func (*GitilesTrigger) Descriptor

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

func (*GitilesTrigger) GetRef

func (m *GitilesTrigger) GetRef() string

func (*GitilesTrigger) GetRepo

func (m *GitilesTrigger) GetRepo() string

func (*GitilesTrigger) GetRevision

func (m *GitilesTrigger) GetRevision() string

func (*GitilesTrigger) ProtoMessage

func (*GitilesTrigger) ProtoMessage()

func (*GitilesTrigger) Reset

func (m *GitilesTrigger) Reset()

func (*GitilesTrigger) String

func (m *GitilesTrigger) String() string

func (*GitilesTrigger) XXX_DiscardUnknown

func (m *GitilesTrigger) XXX_DiscardUnknown()

func (*GitilesTrigger) XXX_Marshal

func (m *GitilesTrigger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GitilesTrigger) XXX_Merge

func (m *GitilesTrigger) XXX_Merge(src proto.Message)

func (*GitilesTrigger) XXX_Size

func (m *GitilesTrigger) XXX_Size() int

func (*GitilesTrigger) XXX_Unmarshal

func (m *GitilesTrigger) XXX_Unmarshal(b []byte) error

type Invocation

type Invocation struct {
	InvocationRef *InvocationRef `protobuf:"bytes,1,opt,name=invocation_ref,json=invocationRef,proto3" json:"invocation_ref,omitempty"`
	// start_ts is unix timestamp in microseconds.
	StartedTs int64 `protobuf:"varint,2,opt,name=started_ts,json=startedTs,proto3" json:"started_ts,omitempty"`
	// finished_ts is unix timestamp in microseconds. Set only if final is true.
	FinishedTs int64 `protobuf:"varint,3,opt,name=finished_ts,json=finishedTs,proto3" json:"finished_ts,omitempty"`
	// triggered_by is an identity ("kind:value") which is specified only if
	// invocation was triggered by not the scheduler service itself.
	TriggeredBy string `protobuf:"bytes,4,opt,name=triggered_by,json=triggeredBy,proto3" json:"triggered_by,omitempty"`
	// Latest status of a job.
	Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	// If true, this invocation properties are final and won't be changed.
	Final bool `protobuf:"varint,6,opt,name=final,proto3" json:"final,omitempty"`
	// config_revision pins project/job config version according to which this
	// invocation was created.
	ConfigRevision string `protobuf:"bytes,7,opt,name=config_revision,json=configRevision,proto3" json:"config_revision,omitempty"`
	// view_url points to human readable page for a given invocation if available.
	ViewUrl              string   `protobuf:"bytes,8,opt,name=view_url,json=viewUrl,proto3" json:"view_url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Invocation describes properties of one job execution.

func (*Invocation) Descriptor

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

func (*Invocation) GetConfigRevision

func (m *Invocation) GetConfigRevision() string

func (*Invocation) GetFinal

func (m *Invocation) GetFinal() bool

func (*Invocation) GetFinishedTs

func (m *Invocation) GetFinishedTs() int64

func (*Invocation) GetInvocationRef

func (m *Invocation) GetInvocationRef() *InvocationRef

func (*Invocation) GetStartedTs

func (m *Invocation) GetStartedTs() int64

func (*Invocation) GetStatus

func (m *Invocation) GetStatus() string

func (*Invocation) GetTriggeredBy

func (m *Invocation) GetTriggeredBy() string

func (*Invocation) GetViewUrl

func (m *Invocation) GetViewUrl() string

func (*Invocation) ProtoMessage

func (*Invocation) ProtoMessage()

func (*Invocation) Reset

func (m *Invocation) Reset()

func (*Invocation) String

func (m *Invocation) String() string

func (*Invocation) XXX_DiscardUnknown

func (m *Invocation) XXX_DiscardUnknown()

func (*Invocation) XXX_Marshal

func (m *Invocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Invocation) XXX_Merge

func (m *Invocation) XXX_Merge(src proto.Message)

func (*Invocation) XXX_Size

func (m *Invocation) XXX_Size() int

func (*Invocation) XXX_Unmarshal

func (m *Invocation) XXX_Unmarshal(b []byte) error

type InvocationRef

type InvocationRef struct {
	JobRef *JobRef `protobuf:"bytes,1,opt,name=job_ref,json=jobRef,proto3" json:"job_ref,omitempty"`
	// invocation_id is a unique integer among all invocations for a given job.
	// However, there could be invocations with the same invocation_id but
	// belonging to different jobs.
	InvocationId         int64    `protobuf:"varint,2,opt,name=invocation_id,json=invocationId,proto3" json:"invocation_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

InvocationRef uniquely identifies an invocation of a job.

func (*InvocationRef) Descriptor

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

func (*InvocationRef) GetInvocationId

func (m *InvocationRef) GetInvocationId() int64

func (*InvocationRef) GetJobRef

func (m *InvocationRef) GetJobRef() *JobRef

func (*InvocationRef) ProtoMessage

func (*InvocationRef) ProtoMessage()

func (*InvocationRef) Reset

func (m *InvocationRef) Reset()

func (*InvocationRef) String

func (m *InvocationRef) String() string

func (*InvocationRef) XXX_DiscardUnknown

func (m *InvocationRef) XXX_DiscardUnknown()

func (*InvocationRef) XXX_Marshal

func (m *InvocationRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InvocationRef) XXX_Merge

func (m *InvocationRef) XXX_Merge(src proto.Message)

func (*InvocationRef) XXX_Size

func (m *InvocationRef) XXX_Size() int

func (*InvocationRef) XXX_Unmarshal

func (m *InvocationRef) XXX_Unmarshal(b []byte) error

type InvocationsReply

type InvocationsReply struct {
	Invocations          []*Invocation `protobuf:"bytes,1,rep,name=invocations,proto3" json:"invocations,omitempty"`
	NextCursor           string        `protobuf:"bytes,2,opt,name=next_cursor,json=nextCursor,proto3" json:"next_cursor,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*InvocationsReply) Descriptor

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

func (*InvocationsReply) GetInvocations

func (m *InvocationsReply) GetInvocations() []*Invocation

func (*InvocationsReply) GetNextCursor

func (m *InvocationsReply) GetNextCursor() string

func (*InvocationsReply) ProtoMessage

func (*InvocationsReply) ProtoMessage()

func (*InvocationsReply) Reset

func (m *InvocationsReply) Reset()

func (*InvocationsReply) String

func (m *InvocationsReply) String() string

func (*InvocationsReply) XXX_DiscardUnknown

func (m *InvocationsReply) XXX_DiscardUnknown()

func (*InvocationsReply) XXX_Marshal

func (m *InvocationsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InvocationsReply) XXX_Merge

func (m *InvocationsReply) XXX_Merge(src proto.Message)

func (*InvocationsReply) XXX_Size

func (m *InvocationsReply) XXX_Size() int

func (*InvocationsReply) XXX_Unmarshal

func (m *InvocationsReply) XXX_Unmarshal(b []byte) error

type InvocationsRequest

type InvocationsRequest struct {
	JobRef *JobRef `protobuf:"bytes,1,opt,name=job_ref,json=jobRef,proto3" json:"job_ref,omitempty"`
	Cursor string  `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// page_size defaults to 50 which is maximum.
	PageSize             int32    `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*InvocationsRequest) Descriptor

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

func (*InvocationsRequest) GetCursor

func (m *InvocationsRequest) GetCursor() string

func (*InvocationsRequest) GetJobRef

func (m *InvocationsRequest) GetJobRef() *JobRef

func (*InvocationsRequest) GetPageSize

func (m *InvocationsRequest) GetPageSize() int32

func (*InvocationsRequest) ProtoMessage

func (*InvocationsRequest) ProtoMessage()

func (*InvocationsRequest) Reset

func (m *InvocationsRequest) Reset()

func (*InvocationsRequest) String

func (m *InvocationsRequest) String() string

func (*InvocationsRequest) XXX_DiscardUnknown

func (m *InvocationsRequest) XXX_DiscardUnknown()

func (*InvocationsRequest) XXX_Marshal

func (m *InvocationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InvocationsRequest) XXX_Merge

func (m *InvocationsRequest) XXX_Merge(src proto.Message)

func (*InvocationsRequest) XXX_Size

func (m *InvocationsRequest) XXX_Size() int

func (*InvocationsRequest) XXX_Unmarshal

func (m *InvocationsRequest) XXX_Unmarshal(b []byte) error

type Job

type Job struct {
	JobRef               *JobRef   `protobuf:"bytes,1,opt,name=job_ref,json=jobRef,proto3" json:"job_ref,omitempty"`
	Schedule             string    `protobuf:"bytes,2,opt,name=schedule,proto3" json:"schedule,omitempty"`
	State                *JobState `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	Paused               bool      `protobuf:"varint,4,opt,name=paused,proto3" json:"paused,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

Job descibes currently configured job.

func (*Job) Descriptor

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

func (*Job) GetJobRef

func (m *Job) GetJobRef() *JobRef

func (*Job) GetPaused

func (m *Job) GetPaused() bool

func (*Job) GetSchedule

func (m *Job) GetSchedule() string

func (*Job) GetState

func (m *Job) GetState() *JobState

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) Reset

func (m *Job) Reset()

func (*Job) String

func (m *Job) String() string

func (*Job) XXX_DiscardUnknown

func (m *Job) XXX_DiscardUnknown()

func (*Job) XXX_Marshal

func (m *Job) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Job) XXX_Merge

func (m *Job) XXX_Merge(src proto.Message)

func (*Job) XXX_Size

func (m *Job) XXX_Size() int

func (*Job) XXX_Unmarshal

func (m *Job) XXX_Unmarshal(b []byte) error

type JobRef

type JobRef struct {
	Project              string   `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
	Job                  string   `protobuf:"bytes,2,opt,name=job,proto3" json:"job,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

JobRef uniquely identifies a job.

func (*JobRef) Descriptor

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

func (*JobRef) GetJob

func (m *JobRef) GetJob() string

func (*JobRef) GetProject

func (m *JobRef) GetProject() string

func (*JobRef) ProtoMessage

func (*JobRef) ProtoMessage()

func (*JobRef) Reset

func (m *JobRef) Reset()

func (*JobRef) String

func (m *JobRef) String() string

func (*JobRef) XXX_DiscardUnknown

func (m *JobRef) XXX_DiscardUnknown()

func (*JobRef) XXX_Marshal

func (m *JobRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JobRef) XXX_Merge

func (m *JobRef) XXX_Merge(src proto.Message)

func (*JobRef) XXX_Size

func (m *JobRef) XXX_Size() int

func (*JobRef) XXX_Unmarshal

func (m *JobRef) XXX_Unmarshal(b []byte) error

type JobState

type JobState struct {
	UiStatus             string   `protobuf:"bytes,1,opt,name=ui_status,json=uiStatus,proto3" json:"ui_status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

JobState describes current Job state as one of these strings:

"DISABLED"
"PAUSED"
"RUNNING"
"SCHEDULED"
"WAITING"

func (*JobState) Descriptor

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

func (*JobState) GetUiStatus

func (m *JobState) GetUiStatus() string

func (*JobState) ProtoMessage

func (*JobState) ProtoMessage()

func (*JobState) Reset

func (m *JobState) Reset()

func (*JobState) String

func (m *JobState) String() string

func (*JobState) XXX_DiscardUnknown

func (m *JobState) XXX_DiscardUnknown()

func (*JobState) XXX_Marshal

func (m *JobState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JobState) XXX_Merge

func (m *JobState) XXX_Merge(src proto.Message)

func (*JobState) XXX_Size

func (m *JobState) XXX_Size() int

func (*JobState) XXX_Unmarshal

func (m *JobState) XXX_Unmarshal(b []byte) error

type JobsReply

type JobsReply struct {
	Jobs                 []*Job   `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"`
	NextCursor           string   `protobuf:"bytes,2,opt,name=next_cursor,json=nextCursor,proto3" json:"next_cursor,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*JobsReply) Descriptor

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

func (*JobsReply) GetJobs

func (m *JobsReply) GetJobs() []*Job

func (*JobsReply) GetNextCursor

func (m *JobsReply) GetNextCursor() string

func (*JobsReply) ProtoMessage

func (*JobsReply) ProtoMessage()

func (*JobsReply) Reset

func (m *JobsReply) Reset()

func (*JobsReply) String

func (m *JobsReply) String() string

func (*JobsReply) XXX_DiscardUnknown

func (m *JobsReply) XXX_DiscardUnknown()

func (*JobsReply) XXX_Marshal

func (m *JobsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JobsReply) XXX_Merge

func (m *JobsReply) XXX_Merge(src proto.Message)

func (*JobsReply) XXX_Size

func (m *JobsReply) XXX_Size() int

func (*JobsReply) XXX_Unmarshal

func (m *JobsReply) XXX_Unmarshal(b []byte) error

type JobsRequest

type JobsRequest struct {
	// If not specified or "", all projects' jobs are returned.
	Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
	Cursor  string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// page_size is currently not implemented and is ignored.
	PageSize             int32    `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*JobsRequest) Descriptor

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

func (*JobsRequest) GetCursor

func (m *JobsRequest) GetCursor() string

func (*JobsRequest) GetPageSize

func (m *JobsRequest) GetPageSize() int32

func (*JobsRequest) GetProject

func (m *JobsRequest) GetProject() string

func (*JobsRequest) ProtoMessage

func (*JobsRequest) ProtoMessage()

func (*JobsRequest) Reset

func (m *JobsRequest) Reset()

func (*JobsRequest) String

func (m *JobsRequest) String() string

func (*JobsRequest) XXX_DiscardUnknown

func (m *JobsRequest) XXX_DiscardUnknown()

func (*JobsRequest) XXX_Marshal

func (m *JobsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JobsRequest) XXX_Merge

func (m *JobsRequest) XXX_Merge(src proto.Message)

func (*JobsRequest) XXX_Size

func (m *JobsRequest) XXX_Size() int

func (*JobsRequest) XXX_Unmarshal

func (m *JobsRequest) XXX_Unmarshal(b []byte) error

type NoopTrigger

type NoopTrigger struct {
	Data                 string   `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

NoopTrigger is used by Scheduler integration tests to represent test triggers.

func (*NoopTrigger) Descriptor

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

func (*NoopTrigger) GetData

func (m *NoopTrigger) GetData() string

func (*NoopTrigger) ProtoMessage

func (*NoopTrigger) ProtoMessage()

func (*NoopTrigger) Reset

func (m *NoopTrigger) Reset()

func (*NoopTrigger) String

func (m *NoopTrigger) String() string

func (*NoopTrigger) XXX_DiscardUnknown

func (m *NoopTrigger) XXX_DiscardUnknown()

func (*NoopTrigger) XXX_Marshal

func (m *NoopTrigger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NoopTrigger) XXX_Merge

func (m *NoopTrigger) XXX_Merge(src proto.Message)

func (*NoopTrigger) XXX_Size

func (m *NoopTrigger) XXX_Size() int

func (*NoopTrigger) XXX_Unmarshal

func (m *NoopTrigger) XXX_Unmarshal(b []byte) error

type SchedulerClient

type SchedulerClient interface {
	// GetJobs fetches all jobs satisfying JobsRequest and visibility ACLs.
	// If JobsRequest.project is specified but the project doesn't exist, empty
	// list of Jobs is returned.
	GetJobs(ctx context.Context, in *JobsRequest, opts ...grpc.CallOption) (*JobsReply, error)
	// GetInvocations fetches invocations of a given job, most recent first.
	GetInvocations(ctx context.Context, in *InvocationsRequest, opts ...grpc.CallOption) (*InvocationsReply, error)
	// GetInvocation fetches a single invocation.
	GetInvocation(ctx context.Context, in *InvocationRef, opts ...grpc.CallOption) (*Invocation, error)
	// PauseJob will prevent automatic triggering of a job. Manual triggering such
	// as through this API is still allowed. Any pending or running invocations
	// are still executed. PauseJob does nothing if job is already paused.
	//
	// Requires OWNER Job permission.
	PauseJob(ctx context.Context, in *JobRef, opts ...grpc.CallOption) (*empty.Empty, error)
	// ResumeJob resumes paused job. ResumeJob does nothing if job is not paused.
	//
	// Requires OWNER Job permission.
	ResumeJob(ctx context.Context, in *JobRef, opts ...grpc.CallOption) (*empty.Empty, error)
	// AbortJob resets the job to scheduled state, aborting a currently pending or
	// running invocation if any.
	//
	// Note, that this is similar to AbortInvocation except that AbortInvocation
	// requires invocation ID and doesn't ensure that the invocation aborted is
	// actually latest triggered for the job.
	//
	// Requires OWNER Job permission.
	AbortJob(ctx context.Context, in *JobRef, opts ...grpc.CallOption) (*empty.Empty, error)
	// AbortInvocation aborts a given job invocation.
	// If an invocation is final, AbortInvocation does nothing.
	//
	// If you want to abort a specific hung invocation, use this request instead
	// of AbortJob.
	//
	// Requires OWNER Job permission.
	AbortInvocation(ctx context.Context, in *InvocationRef, opts ...grpc.CallOption) (*empty.Empty, error)
	// EmitTriggers puts one or more triggers into pending trigger queues of the
	// specified jobs.
	//
	// This eventually causes jobs to start executing. The scheduler may merge
	// multiple triggers into one job execution, based on how the job is
	// configured.
	//
	// If at least one job doesn't exist or the caller has no permission to
	// trigger it, the entire request is aborted. Otherwise, the request is NOT
	// transactional: if it fails midway (e.g by returning internal server error),
	// some triggers may have been submitted and some may not. It is safe to retry
	// the call, supplying the same trigger IDs. Triggers with the same IDs will
	// be deduplicated. See Trigger message for more details.
	//
	// Requires TRIGGERER Job permission.
	EmitTriggers(ctx context.Context, in *EmitTriggersRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

SchedulerClient is the client API for Scheduler service.

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

func NewSchedulerClient

func NewSchedulerClient(cc grpc.ClientConnInterface) SchedulerClient

func NewSchedulerPRPCClient

func NewSchedulerPRPCClient(client *prpc.Client) SchedulerClient

type SchedulerServer

type SchedulerServer interface {
	// GetJobs fetches all jobs satisfying JobsRequest and visibility ACLs.
	// If JobsRequest.project is specified but the project doesn't exist, empty
	// list of Jobs is returned.
	GetJobs(context.Context, *JobsRequest) (*JobsReply, error)
	// GetInvocations fetches invocations of a given job, most recent first.
	GetInvocations(context.Context, *InvocationsRequest) (*InvocationsReply, error)
	// GetInvocation fetches a single invocation.
	GetInvocation(context.Context, *InvocationRef) (*Invocation, error)
	// PauseJob will prevent automatic triggering of a job. Manual triggering such
	// as through this API is still allowed. Any pending or running invocations
	// are still executed. PauseJob does nothing if job is already paused.
	//
	// Requires OWNER Job permission.
	PauseJob(context.Context, *JobRef) (*empty.Empty, error)
	// ResumeJob resumes paused job. ResumeJob does nothing if job is not paused.
	//
	// Requires OWNER Job permission.
	ResumeJob(context.Context, *JobRef) (*empty.Empty, error)
	// AbortJob resets the job to scheduled state, aborting a currently pending or
	// running invocation if any.
	//
	// Note, that this is similar to AbortInvocation except that AbortInvocation
	// requires invocation ID and doesn't ensure that the invocation aborted is
	// actually latest triggered for the job.
	//
	// Requires OWNER Job permission.
	AbortJob(context.Context, *JobRef) (*empty.Empty, error)
	// AbortInvocation aborts a given job invocation.
	// If an invocation is final, AbortInvocation does nothing.
	//
	// If you want to abort a specific hung invocation, use this request instead
	// of AbortJob.
	//
	// Requires OWNER Job permission.
	AbortInvocation(context.Context, *InvocationRef) (*empty.Empty, error)
	// EmitTriggers puts one or more triggers into pending trigger queues of the
	// specified jobs.
	//
	// This eventually causes jobs to start executing. The scheduler may merge
	// multiple triggers into one job execution, based on how the job is
	// configured.
	//
	// If at least one job doesn't exist or the caller has no permission to
	// trigger it, the entire request is aborted. Otherwise, the request is NOT
	// transactional: if it fails midway (e.g by returning internal server error),
	// some triggers may have been submitted and some may not. It is safe to retry
	// the call, supplying the same trigger IDs. Triggers with the same IDs will
	// be deduplicated. See Trigger message for more details.
	//
	// Requires TRIGGERER Job permission.
	EmitTriggers(context.Context, *EmitTriggersRequest) (*empty.Empty, error)
}

SchedulerServer is the server API for Scheduler service.

type Trigger

type Trigger struct {
	// Unique identifier of the trigger.
	//
	// It is used to deduplicate and hence provide idempotency for adding
	// a trigger. Each job has an internal buffer with IDs of recent triggers it
	// received. Triggers that have already been seen are silently skipped. The
	// buffer is periodically cleaned, so old IDs can be potentially reused,
	// though you should not rely on that.
	//
	// Must be provided by whoever emits the trigger. Can be anything at all, as
	// long as it is unique.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Optional user friendly name for this trigger that shows up in Scheduler UI.
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	// Optional HTTP link to display in Scheduler UI.
	Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	// Actual trigger data. Its type defines how the trigger will be processed
	// by the Scheduler, see corresponding protos.
	//
	// Types that are valid to be assigned to Payload:
	//	*Trigger_Cron
	//	*Trigger_Webui
	//	*Trigger_Noop
	//	*Trigger_Gitiles
	//	*Trigger_Buildbucket
	Payload              isTrigger_Payload `protobuf_oneof:"payload"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Trigger can be emitted by triggering tasks (such as Gitiles tasks) or through API and consumed by triggered tasks (such as Buildbucket tasks).

func (*Trigger) Descriptor

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

func (*Trigger) GetBuildbucket

func (m *Trigger) GetBuildbucket() *BuildbucketTrigger

func (*Trigger) GetCron

func (m *Trigger) GetCron() *CronTrigger

func (*Trigger) GetGitiles

func (m *Trigger) GetGitiles() *GitilesTrigger

func (*Trigger) GetId

func (m *Trigger) GetId() string

func (*Trigger) GetNoop

func (m *Trigger) GetNoop() *NoopTrigger

func (*Trigger) GetPayload

func (m *Trigger) GetPayload() isTrigger_Payload

func (*Trigger) GetTitle

func (m *Trigger) GetTitle() string

func (*Trigger) GetUrl

func (m *Trigger) GetUrl() string

func (*Trigger) GetWebui

func (m *Trigger) GetWebui() *WebUITrigger

func (*Trigger) ProtoMessage

func (*Trigger) ProtoMessage()

func (*Trigger) Reset

func (m *Trigger) Reset()

func (*Trigger) String

func (m *Trigger) String() string

func (*Trigger) XXX_DiscardUnknown

func (m *Trigger) XXX_DiscardUnknown()

func (*Trigger) XXX_Marshal

func (m *Trigger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Trigger) XXX_Merge

func (m *Trigger) XXX_Merge(src proto.Message)

func (*Trigger) XXX_OneofWrappers

func (*Trigger) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Trigger) XXX_Size

func (m *Trigger) XXX_Size() int

func (*Trigger) XXX_Unmarshal

func (m *Trigger) XXX_Unmarshal(b []byte) error

type Trigger_Buildbucket

type Trigger_Buildbucket struct {
	Buildbucket *BuildbucketTrigger `protobuf:"bytes,52,opt,name=buildbucket,proto3,oneof"`
}

type Trigger_Cron

type Trigger_Cron struct {
	Cron *CronTrigger `protobuf:"bytes,40,opt,name=cron,proto3,oneof"`
}

type Trigger_Gitiles

type Trigger_Gitiles struct {
	Gitiles *GitilesTrigger `protobuf:"bytes,51,opt,name=gitiles,proto3,oneof"`
}

type Trigger_Noop

type Trigger_Noop struct {
	Noop *NoopTrigger `protobuf:"bytes,50,opt,name=noop,proto3,oneof"`
}

type Trigger_Webui

type Trigger_Webui struct {
	Webui *WebUITrigger `protobuf:"bytes,41,opt,name=webui,proto3,oneof"`
}

type UnimplementedSchedulerServer

type UnimplementedSchedulerServer struct {
}

UnimplementedSchedulerServer can be embedded to have forward compatible implementations.

func (*UnimplementedSchedulerServer) AbortInvocation

func (*UnimplementedSchedulerServer) AbortInvocation(ctx context.Context, req *InvocationRef) (*empty.Empty, error)

func (*UnimplementedSchedulerServer) AbortJob

func (*UnimplementedSchedulerServer) EmitTriggers

func (*UnimplementedSchedulerServer) GetInvocation

func (*UnimplementedSchedulerServer) GetInvocations

func (*UnimplementedSchedulerServer) GetJobs

func (*UnimplementedSchedulerServer) PauseJob

func (*UnimplementedSchedulerServer) ResumeJob

type WebUITrigger

type WebUITrigger struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

WebUITrigger is emitted whenever users click "Trigger" button in UI.

Note: such triggers can't be scheduled through external Scheduler API (to avoid confusion). They may appear in the API responses though.

func (*WebUITrigger) Descriptor

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

func (*WebUITrigger) ProtoMessage

func (*WebUITrigger) ProtoMessage()

func (*WebUITrigger) Reset

func (m *WebUITrigger) Reset()

func (*WebUITrigger) String

func (m *WebUITrigger) String() string

func (*WebUITrigger) XXX_DiscardUnknown

func (m *WebUITrigger) XXX_DiscardUnknown()

func (*WebUITrigger) XXX_Marshal

func (m *WebUITrigger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WebUITrigger) XXX_Merge

func (m *WebUITrigger) XXX_Merge(src proto.Message)

func (*WebUITrigger) XXX_Size

func (m *WebUITrigger) XXX_Size() int

func (*WebUITrigger) XXX_Unmarshal

func (m *WebUITrigger) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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