luci: go.chromium.org/luci/scheduler/api/scheduler/v1 Index | Files

package scheduler

import "go.chromium.org/luci/scheduler/api/scheduler/v1"

Package scheduler contains the main API of Scheduler service.

Index

Package Files

gen.go pb.discovery.go scheduler.pb.go scheduler_grpc.pb.go triggers.pb.go

Variables

var File_go_chromium_org_luci_scheduler_api_scheduler_v1_scheduler_proto protoreflect.FileDescriptor
var File_go_chromium_org_luci_scheduler_api_scheduler_v1_triggers_proto protoreflect.FileDescriptor

func FileDescriptorSet Uses

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 RegisterSchedulerServer Uses

func RegisterSchedulerServer(s grpc.ServiceRegistrar, srv SchedulerServer)

type BuildbucketTrigger Uses

type BuildbucketTrigger struct {
    Properties *structpb.Struct `protobuf:"bytes,1,opt,name=properties,proto3" json:"properties,omitempty"`
    Tags       []string         `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"`
    // contains filtered or unexported fields
}

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 Uses

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

Deprecated: Use BuildbucketTrigger.ProtoReflect.Descriptor instead.

func (*BuildbucketTrigger) GetProperties Uses

func (x *BuildbucketTrigger) GetProperties() *structpb.Struct

func (*BuildbucketTrigger) GetTags Uses

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

func (*BuildbucketTrigger) ProtoMessage Uses

func (*BuildbucketTrigger) ProtoMessage()

func (*BuildbucketTrigger) ProtoReflect Uses

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

func (*BuildbucketTrigger) Reset Uses

func (x *BuildbucketTrigger) Reset()

func (*BuildbucketTrigger) String Uses

func (x *BuildbucketTrigger) String() string

type CronTrigger Uses

type CronTrigger struct {
    Generation int64 `protobuf:"varint,1,opt,name=generation,proto3" json:"generation,omitempty"` // monotonically increasing number
    // contains filtered or unexported fields
}

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 Uses

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

Deprecated: Use CronTrigger.ProtoReflect.Descriptor instead.

func (*CronTrigger) GetGeneration Uses

func (x *CronTrigger) GetGeneration() int64

func (*CronTrigger) ProtoMessage Uses

func (*CronTrigger) ProtoMessage()

func (*CronTrigger) ProtoReflect Uses

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

func (*CronTrigger) Reset Uses

func (x *CronTrigger) Reset()

func (*CronTrigger) String Uses

func (x *CronTrigger) String() string

type EmitTriggersRequest Uses

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"`
    // contains filtered or unexported fields
}

func (*EmitTriggersRequest) Descriptor Uses

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

Deprecated: Use EmitTriggersRequest.ProtoReflect.Descriptor instead.

func (*EmitTriggersRequest) GetBatches Uses

func (x *EmitTriggersRequest) GetBatches() []*EmitTriggersRequest_Batch

func (*EmitTriggersRequest) GetTimestamp Uses

func (x *EmitTriggersRequest) GetTimestamp() int64

func (*EmitTriggersRequest) ProtoMessage Uses

func (*EmitTriggersRequest) ProtoMessage()

func (*EmitTriggersRequest) ProtoReflect Uses

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

func (*EmitTriggersRequest) Reset Uses

func (x *EmitTriggersRequest) Reset()

func (*EmitTriggersRequest) String Uses

func (x *EmitTriggersRequest) String() string

type EmitTriggersRequest_Batch Uses

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"`
    // contains filtered or unexported fields
}

func (*EmitTriggersRequest_Batch) Descriptor Uses

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

Deprecated: Use EmitTriggersRequest_Batch.ProtoReflect.Descriptor instead.

func (*EmitTriggersRequest_Batch) GetJobs Uses

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

func (*EmitTriggersRequest_Batch) GetTrigger Uses

func (x *EmitTriggersRequest_Batch) GetTrigger() *Trigger

func (*EmitTriggersRequest_Batch) ProtoMessage Uses

func (*EmitTriggersRequest_Batch) ProtoMessage()

func (*EmitTriggersRequest_Batch) ProtoReflect Uses

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

func (*EmitTriggersRequest_Batch) Reset Uses

func (x *EmitTriggersRequest_Batch) Reset()

func (*EmitTriggersRequest_Batch) String Uses

func (x *EmitTriggersRequest_Batch) String() string

type GitilesTrigger Uses

type GitilesTrigger struct {
    Repo     string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`         // an URL of a repo that changed
    Ref      string `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"`           // a ref that changed, in full, e.g "refs/heads/master"
    Revision string `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"` // a revision (SHA1 in hex) pointed to by the ref
    // contains filtered or unexported fields
}

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 Uses

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

Deprecated: Use GitilesTrigger.ProtoReflect.Descriptor instead.

func (*GitilesTrigger) GetRef Uses

func (x *GitilesTrigger) GetRef() string

func (*GitilesTrigger) GetRepo Uses

func (x *GitilesTrigger) GetRepo() string

func (*GitilesTrigger) GetRevision Uses

func (x *GitilesTrigger) GetRevision() string

func (*GitilesTrigger) ProtoMessage Uses

func (*GitilesTrigger) ProtoMessage()

func (*GitilesTrigger) ProtoReflect Uses

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

func (*GitilesTrigger) Reset Uses

func (x *GitilesTrigger) Reset()

func (*GitilesTrigger) String Uses

func (x *GitilesTrigger) String() string

type Invocation Uses

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"`
    // contains filtered or unexported fields
}

Invocation describes properties of one job execution.

func (*Invocation) Descriptor Uses

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

Deprecated: Use Invocation.ProtoReflect.Descriptor instead.

func (*Invocation) GetConfigRevision Uses

func (x *Invocation) GetConfigRevision() string

func (*Invocation) GetFinal Uses

func (x *Invocation) GetFinal() bool

func (*Invocation) GetFinishedTs Uses

func (x *Invocation) GetFinishedTs() int64

func (*Invocation) GetInvocationRef Uses

func (x *Invocation) GetInvocationRef() *InvocationRef

func (*Invocation) GetStartedTs Uses

func (x *Invocation) GetStartedTs() int64

func (*Invocation) GetStatus Uses

func (x *Invocation) GetStatus() string

func (*Invocation) GetTriggeredBy Uses

func (x *Invocation) GetTriggeredBy() string

func (*Invocation) GetViewUrl Uses

func (x *Invocation) GetViewUrl() string

func (*Invocation) ProtoMessage Uses

func (*Invocation) ProtoMessage()

func (*Invocation) ProtoReflect Uses

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

func (*Invocation) Reset Uses

func (x *Invocation) Reset()

func (*Invocation) String Uses

func (x *Invocation) String() string

type InvocationRef Uses

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"`
    // contains filtered or unexported fields
}

InvocationRef uniquely identifies an invocation of a job.

func (*InvocationRef) Descriptor Uses

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

Deprecated: Use InvocationRef.ProtoReflect.Descriptor instead.

func (*InvocationRef) GetInvocationId Uses

func (x *InvocationRef) GetInvocationId() int64

func (*InvocationRef) GetJobRef Uses

func (x *InvocationRef) GetJobRef() *JobRef

func (*InvocationRef) ProtoMessage Uses

func (*InvocationRef) ProtoMessage()

func (*InvocationRef) ProtoReflect Uses

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

func (*InvocationRef) Reset Uses

func (x *InvocationRef) Reset()

func (*InvocationRef) String Uses

func (x *InvocationRef) String() string

type InvocationsReply Uses

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"`
    // contains filtered or unexported fields
}

func (*InvocationsReply) Descriptor Uses

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

Deprecated: Use InvocationsReply.ProtoReflect.Descriptor instead.

func (*InvocationsReply) GetInvocations Uses

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

func (*InvocationsReply) GetNextCursor Uses

func (x *InvocationsReply) GetNextCursor() string

func (*InvocationsReply) ProtoMessage Uses

func (*InvocationsReply) ProtoMessage()

func (*InvocationsReply) ProtoReflect Uses

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

func (*InvocationsReply) Reset Uses

func (x *InvocationsReply) Reset()

func (*InvocationsReply) String Uses

func (x *InvocationsReply) String() string

type InvocationsRequest Uses

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"`
    // contains filtered or unexported fields
}

func (*InvocationsRequest) Descriptor Uses

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

Deprecated: Use InvocationsRequest.ProtoReflect.Descriptor instead.

func (*InvocationsRequest) GetCursor Uses

func (x *InvocationsRequest) GetCursor() string

func (*InvocationsRequest) GetJobRef Uses

func (x *InvocationsRequest) GetJobRef() *JobRef

func (*InvocationsRequest) GetPageSize Uses

func (x *InvocationsRequest) GetPageSize() int32

func (*InvocationsRequest) ProtoMessage Uses

func (*InvocationsRequest) ProtoMessage()

func (*InvocationsRequest) ProtoReflect Uses

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

func (*InvocationsRequest) Reset Uses

func (x *InvocationsRequest) Reset()

func (*InvocationsRequest) String Uses

func (x *InvocationsRequest) String() string

type Job Uses

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"`
    // contains filtered or unexported fields
}

Job descibes currently configured job.

func (*Job) Descriptor Uses

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

Deprecated: Use Job.ProtoReflect.Descriptor instead.

func (*Job) GetJobRef Uses

func (x *Job) GetJobRef() *JobRef

func (*Job) GetPaused Uses

func (x *Job) GetPaused() bool

func (*Job) GetSchedule Uses

func (x *Job) GetSchedule() string

func (*Job) GetState Uses

func (x *Job) GetState() *JobState

func (*Job) ProtoMessage Uses

func (*Job) ProtoMessage()

func (*Job) ProtoReflect Uses

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

func (*Job) Reset Uses

func (x *Job) Reset()

func (*Job) String Uses

func (x *Job) String() string

type JobRef Uses

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"`
    // contains filtered or unexported fields
}

JobRef uniquely identifies a job.

func (*JobRef) Descriptor Uses

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

Deprecated: Use JobRef.ProtoReflect.Descriptor instead.

func (*JobRef) GetJob Uses

func (x *JobRef) GetJob() string

func (*JobRef) GetProject Uses

func (x *JobRef) GetProject() string

func (*JobRef) ProtoMessage Uses

func (*JobRef) ProtoMessage()

func (*JobRef) ProtoReflect Uses

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

func (*JobRef) Reset Uses

func (x *JobRef) Reset()

func (*JobRef) String Uses

func (x *JobRef) String() string

type JobState Uses

type JobState struct {
    UiStatus string `protobuf:"bytes,1,opt,name=ui_status,json=uiStatus,proto3" json:"ui_status,omitempty"`
    // contains filtered or unexported fields
}

JobState describes current Job state as one of these strings:

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

func (*JobState) Descriptor Uses

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

Deprecated: Use JobState.ProtoReflect.Descriptor instead.

func (*JobState) GetUiStatus Uses

func (x *JobState) GetUiStatus() string

func (*JobState) ProtoMessage Uses

func (*JobState) ProtoMessage()

func (*JobState) ProtoReflect Uses

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

func (*JobState) Reset Uses

func (x *JobState) Reset()

func (*JobState) String Uses

func (x *JobState) String() string

type JobsReply Uses

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"`
    // contains filtered or unexported fields
}

func (*JobsReply) Descriptor Uses

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

Deprecated: Use JobsReply.ProtoReflect.Descriptor instead.

func (*JobsReply) GetJobs Uses

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

func (*JobsReply) GetNextCursor Uses

func (x *JobsReply) GetNextCursor() string

func (*JobsReply) ProtoMessage Uses

func (*JobsReply) ProtoMessage()

func (*JobsReply) ProtoReflect Uses

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

func (*JobsReply) Reset Uses

func (x *JobsReply) Reset()

func (*JobsReply) String Uses

func (x *JobsReply) String() string

type JobsRequest Uses

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"`
    // contains filtered or unexported fields
}

func (*JobsRequest) Descriptor Uses

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

Deprecated: Use JobsRequest.ProtoReflect.Descriptor instead.

func (*JobsRequest) GetCursor Uses

func (x *JobsRequest) GetCursor() string

func (*JobsRequest) GetPageSize Uses

func (x *JobsRequest) GetPageSize() int32

func (*JobsRequest) GetProject Uses

func (x *JobsRequest) GetProject() string

func (*JobsRequest) ProtoMessage Uses

func (*JobsRequest) ProtoMessage()

func (*JobsRequest) ProtoReflect Uses

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

func (*JobsRequest) Reset Uses

func (x *JobsRequest) Reset()

func (*JobsRequest) String Uses

func (x *JobsRequest) String() string

type NoopTrigger Uses

type NoopTrigger struct {
    Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
    // contains filtered or unexported fields
}

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

func (*NoopTrigger) Descriptor Uses

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

Deprecated: Use NoopTrigger.ProtoReflect.Descriptor instead.

func (*NoopTrigger) GetData Uses

func (x *NoopTrigger) GetData() string

func (*NoopTrigger) ProtoMessage Uses

func (*NoopTrigger) ProtoMessage()

func (*NoopTrigger) ProtoReflect Uses

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

func (*NoopTrigger) Reset Uses

func (x *NoopTrigger) Reset()

func (*NoopTrigger) String Uses

func (x *NoopTrigger) String() string

type SchedulerClient Uses

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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewSchedulerClient Uses

func NewSchedulerClient(cc grpc.ClientConnInterface) SchedulerClient

type SchedulerServer Uses

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)
    // contains filtered or unexported methods
}

SchedulerServer is the server API for Scheduler service. All implementations must embed UnimplementedSchedulerServer for forward compatibility

type Trigger Uses

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 assignable to Payload:
    //	*Trigger_Cron
    //	*Trigger_Webui
    //	*Trigger_Noop
    //	*Trigger_Gitiles
    //	*Trigger_Buildbucket
    Payload isTrigger_Payload `protobuf_oneof:"payload"`
    // contains filtered or unexported fields
}

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 Uses

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

Deprecated: Use Trigger.ProtoReflect.Descriptor instead.

func (*Trigger) GetBuildbucket Uses

func (x *Trigger) GetBuildbucket() *BuildbucketTrigger

func (*Trigger) GetCron Uses

func (x *Trigger) GetCron() *CronTrigger

func (*Trigger) GetGitiles Uses

func (x *Trigger) GetGitiles() *GitilesTrigger

func (*Trigger) GetId Uses

func (x *Trigger) GetId() string

func (*Trigger) GetNoop Uses

func (x *Trigger) GetNoop() *NoopTrigger

func (*Trigger) GetPayload Uses

func (m *Trigger) GetPayload() isTrigger_Payload

func (*Trigger) GetTitle Uses

func (x *Trigger) GetTitle() string

func (*Trigger) GetUrl Uses

func (x *Trigger) GetUrl() string

func (*Trigger) GetWebui Uses

func (x *Trigger) GetWebui() *WebUITrigger

func (*Trigger) ProtoMessage Uses

func (*Trigger) ProtoMessage()

func (*Trigger) ProtoReflect Uses

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

func (*Trigger) Reset Uses

func (x *Trigger) Reset()

func (*Trigger) String Uses

func (x *Trigger) String() string

type Trigger_Buildbucket Uses

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

type Trigger_Cron Uses

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

type Trigger_Gitiles Uses

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

type Trigger_Noop Uses

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

type Trigger_Webui Uses

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

type UnimplementedSchedulerServer Uses

type UnimplementedSchedulerServer struct {
}

UnimplementedSchedulerServer must be embedded to have forward compatible implementations.

func (UnimplementedSchedulerServer) AbortInvocation Uses

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

func (UnimplementedSchedulerServer) AbortJob Uses

func (UnimplementedSchedulerServer) AbortJob(context.Context, *JobRef) (*empty.Empty, error)

func (UnimplementedSchedulerServer) EmitTriggers Uses

func (UnimplementedSchedulerServer) EmitTriggers(context.Context, *EmitTriggersRequest) (*empty.Empty, error)

func (UnimplementedSchedulerServer) GetInvocation Uses

func (UnimplementedSchedulerServer) GetInvocation(context.Context, *InvocationRef) (*Invocation, error)

func (UnimplementedSchedulerServer) GetInvocations Uses

func (UnimplementedSchedulerServer) GetInvocations(context.Context, *InvocationsRequest) (*InvocationsReply, error)

func (UnimplementedSchedulerServer) GetJobs Uses

func (UnimplementedSchedulerServer) GetJobs(context.Context, *JobsRequest) (*JobsReply, error)

func (UnimplementedSchedulerServer) PauseJob Uses

func (UnimplementedSchedulerServer) PauseJob(context.Context, *JobRef) (*empty.Empty, error)

func (UnimplementedSchedulerServer) ResumeJob Uses

func (UnimplementedSchedulerServer) ResumeJob(context.Context, *JobRef) (*empty.Empty, error)

type UnsafeSchedulerServer Uses

type UnsafeSchedulerServer interface {
    // contains filtered or unexported methods
}

UnsafeSchedulerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SchedulerServer will result in compilation errors.

type WebUITrigger Uses

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

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 Uses

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

Deprecated: Use WebUITrigger.ProtoReflect.Descriptor instead.

func (*WebUITrigger) ProtoMessage Uses

func (*WebUITrigger) ProtoMessage()

func (*WebUITrigger) ProtoReflect Uses

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

func (*WebUITrigger) Reset Uses

func (x *WebUITrigger) Reset()

func (*WebUITrigger) String Uses

func (x *WebUITrigger) String() string

Package scheduler imports 13 packages (graph) and is imported by 16 packages. Updated 2020-11-26. Refresh now. Tools for package owners.