luci: go.chromium.org/luci/scheduler/appengine/internal Index | Files

package internal

import "go.chromium.org/luci/scheduler/appengine/internal"

Package internal contains internal structs used by the tasks and the engine.

Index

Package Files

admin.pb.go admin_grpc.pb.go cursors.pb.go db.pb.go gen.go noop_trigger.go pb.discovery.go timers.pb.go tq.pb.go triggers.go triggers.pb.go

Variables

var File_go_chromium_org_luci_scheduler_appengine_internal_admin_proto protoreflect.FileDescriptor
var File_go_chromium_org_luci_scheduler_appengine_internal_cursors_proto protoreflect.FileDescriptor
var File_go_chromium_org_luci_scheduler_appengine_internal_db_proto protoreflect.FileDescriptor
var File_go_chromium_org_luci_scheduler_appengine_internal_timers_proto protoreflect.FileDescriptor
var File_go_chromium_org_luci_scheduler_appengine_internal_tq_proto protoreflect.FileDescriptor
var File_go_chromium_org_luci_scheduler_appengine_internal_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 RegisterAdminServer Uses

func RegisterAdminServer(s grpc.ServiceRegistrar, srv AdminServer)

func ToPublicTrigger Uses

func ToPublicTrigger(t *Trigger) *scheduler.Trigger

ToPublicTrigger converts Trigger to public *scheduler.Trigger.

type AdminClient Uses

type AdminClient interface {
    // GetDebugJobState returns detailed report about the job state.
    //
    // Useful when debugging internal issues.
    GetDebugJobState(ctx context.Context, in *v1.JobRef, opts ...grpc.CallOption) (*DebugJobState, error)
}

AdminClient is the client API for Admin 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 NewAdminClient Uses

func NewAdminClient(cc grpc.ClientConnInterface) AdminClient

type AdminServer Uses

type AdminServer interface {
    // GetDebugJobState returns detailed report about the job state.
    //
    // Useful when debugging internal issues.
    GetDebugJobState(context.Context, *v1.JobRef) (*DebugJobState, error)
    // contains filtered or unexported methods
}

AdminServer is the server API for Admin service. All implementations must embed UnimplementedAdminServer for forward compatibility

type CronTickTask Uses

type CronTickTask struct {
    JobId     string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
    TickNonce int64  `protobuf:"varint,2,opt,name=tick_nonce,json=tickNonce,proto3" json:"tick_nonce,omitempty"` // used to skip no longer interesting ticks
    // contains filtered or unexported fields
}

CronTickTask is scheduled based on the job's cron schedule.

It is enqueued transactionally when the job changes state (e.g. the job appears for the first time or its schedule changes) or from previous cron ticks.

Queue: "crons".

func (*CronTickTask) Descriptor Uses

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

Deprecated: Use CronTickTask.ProtoReflect.Descriptor instead.

func (*CronTickTask) GetJobId Uses

func (x *CronTickTask) GetJobId() string

func (*CronTickTask) GetTickNonce Uses

func (x *CronTickTask) GetTickNonce() int64

func (*CronTickTask) ProtoMessage Uses

func (*CronTickTask) ProtoMessage()

func (*CronTickTask) ProtoReflect Uses

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

func (*CronTickTask) Reset Uses

func (x *CronTickTask) Reset()

func (*CronTickTask) String Uses

func (x *CronTickTask) String() string

type DebugJobState Uses

type DebugJobState struct {
    Enabled             bool                     `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
    Paused              bool                     `protobuf:"varint,2,opt,name=paused,proto3" json:"paused,omitempty"`
    LastTriage          *timestamppb.Timestamp   `protobuf:"bytes,3,opt,name=last_triage,json=lastTriage,proto3" json:"last_triage,omitempty"`
    CronState           *DebugJobState_CronState `protobuf:"bytes,4,opt,name=cron_state,json=cronState,proto3" json:"cron_state,omitempty"`
    ManagerState        *DebugManagerState       `protobuf:"bytes,9,opt,name=manager_state,json=managerState,proto3" json:"manager_state,omitempty"`
    ActiveInvocations   []int64                  `protobuf:"varint,5,rep,packed,name=active_invocations,json=activeInvocations,proto3" json:"active_invocations,omitempty"`
    FinishedInvocations []*FinishedInvocation    `protobuf:"bytes,6,rep,name=finished_invocations,json=finishedInvocations,proto3" json:"finished_invocations,omitempty"`
    RecentlyFinishedSet []int64                  `protobuf:"varint,7,rep,packed,name=recently_finished_set,json=recentlyFinishedSet,proto3" json:"recently_finished_set,omitempty"`
    PendingTriggersSet  []*Trigger               `protobuf:"bytes,8,rep,name=pending_triggers_set,json=pendingTriggersSet,proto3" json:"pending_triggers_set,omitempty"`
    // contains filtered or unexported fields
}

DebugJobState loosely matches Job entity and associated data structures.

See the engine implementation for details.

Next tag: 10.

func (*DebugJobState) Descriptor Uses

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

Deprecated: Use DebugJobState.ProtoReflect.Descriptor instead.

func (*DebugJobState) GetActiveInvocations Uses

func (x *DebugJobState) GetActiveInvocations() []int64

func (*DebugJobState) GetCronState Uses

func (x *DebugJobState) GetCronState() *DebugJobState_CronState

func (*DebugJobState) GetEnabled Uses

func (x *DebugJobState) GetEnabled() bool

func (*DebugJobState) GetFinishedInvocations Uses

func (x *DebugJobState) GetFinishedInvocations() []*FinishedInvocation

func (*DebugJobState) GetLastTriage Uses

func (x *DebugJobState) GetLastTriage() *timestamppb.Timestamp

func (*DebugJobState) GetManagerState Uses

func (x *DebugJobState) GetManagerState() *DebugManagerState

func (*DebugJobState) GetPaused Uses

func (x *DebugJobState) GetPaused() bool

func (*DebugJobState) GetPendingTriggersSet Uses

func (x *DebugJobState) GetPendingTriggersSet() []*Trigger

func (*DebugJobState) GetRecentlyFinishedSet Uses

func (x *DebugJobState) GetRecentlyFinishedSet() []int64

func (*DebugJobState) ProtoMessage Uses

func (*DebugJobState) ProtoMessage()

func (*DebugJobState) ProtoReflect Uses

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

func (*DebugJobState) Reset Uses

func (x *DebugJobState) Reset()

func (*DebugJobState) String Uses

func (x *DebugJobState) String() string

type DebugJobState_CronState Uses

type DebugJobState_CronState struct {
    Enabled       bool                   `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
    Generation    int64                  `protobuf:"varint,2,opt,name=generation,proto3" json:"generation,omitempty"`
    LastRewind    *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_rewind,json=lastRewind,proto3" json:"last_rewind,omitempty"`
    LastTickWhen  *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_tick_when,json=lastTickWhen,proto3" json:"last_tick_when,omitempty"`
    LastTickNonce int64                  `protobuf:"varint,5,opt,name=last_tick_nonce,json=lastTickNonce,proto3" json:"last_tick_nonce,omitempty"`
    // contains filtered or unexported fields
}

func (*DebugJobState_CronState) Descriptor Uses

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

Deprecated: Use DebugJobState_CronState.ProtoReflect.Descriptor instead.

func (*DebugJobState_CronState) GetEnabled Uses

func (x *DebugJobState_CronState) GetEnabled() bool

func (*DebugJobState_CronState) GetGeneration Uses

func (x *DebugJobState_CronState) GetGeneration() int64

func (*DebugJobState_CronState) GetLastRewind Uses

func (x *DebugJobState_CronState) GetLastRewind() *timestamppb.Timestamp

func (*DebugJobState_CronState) GetLastTickNonce Uses

func (x *DebugJobState_CronState) GetLastTickNonce() int64

func (*DebugJobState_CronState) GetLastTickWhen Uses

func (x *DebugJobState_CronState) GetLastTickWhen() *timestamppb.Timestamp

func (*DebugJobState_CronState) ProtoMessage Uses

func (*DebugJobState_CronState) ProtoMessage()

func (*DebugJobState_CronState) ProtoReflect Uses

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

func (*DebugJobState_CronState) Reset Uses

func (x *DebugJobState_CronState) Reset()

func (*DebugJobState_CronState) String Uses

func (x *DebugJobState_CronState) String() string

type DebugManagerState Uses

type DebugManagerState struct {
    Error         string         `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
    DebugLog      string         `protobuf:"bytes,2,opt,name=debug_log,json=debugLog,proto3" json:"debug_log,omitempty"`
    GitilesPoller *pb.DebugState `protobuf:"bytes,3,opt,name=gitiles_poller,json=gitilesPoller,proto3" json:"gitiles_poller,omitempty"`
    // contains filtered or unexported fields
}

DebugManagerState is whatever is reported by task.Manager.GetDebugState.

func (*DebugManagerState) Descriptor Uses

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

Deprecated: Use DebugManagerState.ProtoReflect.Descriptor instead.

func (*DebugManagerState) GetDebugLog Uses

func (x *DebugManagerState) GetDebugLog() string

func (*DebugManagerState) GetError Uses

func (x *DebugManagerState) GetError() string

func (*DebugManagerState) GetGitilesPoller Uses

func (x *DebugManagerState) GetGitilesPoller() *pb.DebugState

func (*DebugManagerState) ProtoMessage Uses

func (*DebugManagerState) ProtoMessage()

func (*DebugManagerState) ProtoReflect Uses

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

func (*DebugManagerState) Reset Uses

func (x *DebugManagerState) Reset()

func (*DebugManagerState) String Uses

func (x *DebugManagerState) String() string

type EnqueueTriggersTask Uses

type EnqueueTriggersTask struct {
    JobId    string     `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
    Triggers []*Trigger `protobuf:"bytes,2,rep,name=triggers,proto3" json:"triggers,omitempty"`
    // contains filtered or unexported fields
}

EnqueueTriggersTask adds given triggers to a job's pending triggers set.

Enqueued non-transactionally (from FanOutTriggersTask) and transactionally (when emitting single trigger from a cron).

Queue: "triggers".

func (*EnqueueTriggersTask) Descriptor Uses

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

Deprecated: Use EnqueueTriggersTask.ProtoReflect.Descriptor instead.

func (*EnqueueTriggersTask) GetJobId Uses

func (x *EnqueueTriggersTask) GetJobId() string

func (*EnqueueTriggersTask) GetTriggers Uses

func (x *EnqueueTriggersTask) GetTriggers() []*Trigger

func (*EnqueueTriggersTask) ProtoMessage Uses

func (*EnqueueTriggersTask) ProtoMessage()

func (*EnqueueTriggersTask) ProtoReflect Uses

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

func (*EnqueueTriggersTask) Reset Uses

func (x *EnqueueTriggersTask) Reset()

func (*EnqueueTriggersTask) String Uses

func (x *EnqueueTriggersTask) String() string

type FanOutTriggersTask Uses

type FanOutTriggersTask struct {
    JobIds   []string   `protobuf:"bytes,1,rep,name=job_ids,json=jobIds,proto3" json:"job_ids,omitempty"`
    Triggers []*Trigger `protobuf:"bytes,2,rep,name=triggers,proto3" json:"triggers,omitempty"`
    // contains filtered or unexported fields
}

FanOutTriggersTask is a batch task that emits a bunch of triggers.

It is enqueued transactionally. It fans out into many EnqueueTriggersTask, one per job ID.

Queue: "triggers".

func (*FanOutTriggersTask) Descriptor Uses

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

Deprecated: Use FanOutTriggersTask.ProtoReflect.Descriptor instead.

func (*FanOutTriggersTask) GetJobIds Uses

func (x *FanOutTriggersTask) GetJobIds() []string

func (*FanOutTriggersTask) GetTriggers Uses

func (x *FanOutTriggersTask) GetTriggers() []*Trigger

func (*FanOutTriggersTask) ProtoMessage Uses

func (*FanOutTriggersTask) ProtoMessage()

func (*FanOutTriggersTask) ProtoReflect Uses

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

func (*FanOutTriggersTask) Reset Uses

func (x *FanOutTriggersTask) Reset()

func (*FanOutTriggersTask) String Uses

func (x *FanOutTriggersTask) String() string

type FinishedInvocation Uses

type FinishedInvocation struct {
    InvocationId int64                  `protobuf:"varint,1,opt,name=invocation_id,json=invocationId,proto3" json:"invocation_id,omitempty"`
    Finished     *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=finished,proto3" json:"finished,omitempty"` // when it was finished
    // contains filtered or unexported fields
}

FinishedInvocation represents a recently finished invocation of a job.

It is stored as part of Job entity inside FinishedInvocationsRaw field.

func (*FinishedInvocation) Descriptor Uses

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

Deprecated: Use FinishedInvocation.ProtoReflect.Descriptor instead.

func (*FinishedInvocation) GetFinished Uses

func (x *FinishedInvocation) GetFinished() *timestamppb.Timestamp

func (*FinishedInvocation) GetInvocationId Uses

func (x *FinishedInvocation) GetInvocationId() int64

func (*FinishedInvocation) ProtoMessage Uses

func (*FinishedInvocation) ProtoMessage()

func (*FinishedInvocation) ProtoReflect Uses

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

func (*FinishedInvocation) Reset Uses

func (x *FinishedInvocation) Reset()

func (*FinishedInvocation) String Uses

func (x *FinishedInvocation) String() string

type FinishedInvocationList Uses

type FinishedInvocationList struct {
    Invocations []*FinishedInvocation `protobuf:"bytes,1,rep,name=invocations,proto3" json:"invocations,omitempty"`
    // contains filtered or unexported fields
}

FinishedInvocationList is stored in Job entities as FinishedInvocationsRaw.

func (*FinishedInvocationList) Descriptor Uses

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

Deprecated: Use FinishedInvocationList.ProtoReflect.Descriptor instead.

func (*FinishedInvocationList) GetInvocations Uses

func (x *FinishedInvocationList) GetInvocations() []*FinishedInvocation

func (*FinishedInvocationList) ProtoMessage Uses

func (*FinishedInvocationList) ProtoMessage()

func (*FinishedInvocationList) ProtoReflect Uses

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

func (*FinishedInvocationList) Reset Uses

func (x *FinishedInvocationList) Reset()

func (*FinishedInvocationList) String Uses

func (x *FinishedInvocationList) String() string

type InvocationFinishedTask Uses

type InvocationFinishedTask struct {
    JobId    string              `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
    InvId    int64               `protobuf:"varint,2,opt,name=inv_id,json=invId,proto3" json:"inv_id,omitempty"`
    Triggers *FanOutTriggersTask `protobuf:"bytes,3,opt,name=triggers,proto3" json:"triggers,omitempty"`
    // contains filtered or unexported fields
}

InvocationFinishedTask is emitted by the invocation when it finishes.

It is enqueued transactionally.

Queue: "completions".

func (*InvocationFinishedTask) Descriptor Uses

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

Deprecated: Use InvocationFinishedTask.ProtoReflect.Descriptor instead.

func (*InvocationFinishedTask) GetInvId Uses

func (x *InvocationFinishedTask) GetInvId() int64

func (*InvocationFinishedTask) GetJobId Uses

func (x *InvocationFinishedTask) GetJobId() string

func (*InvocationFinishedTask) GetTriggers Uses

func (x *InvocationFinishedTask) GetTriggers() *FanOutTriggersTask

func (*InvocationFinishedTask) ProtoMessage Uses

func (*InvocationFinishedTask) ProtoMessage()

func (*InvocationFinishedTask) ProtoReflect Uses

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

func (*InvocationFinishedTask) Reset Uses

func (x *InvocationFinishedTask) Reset()

func (*InvocationFinishedTask) String Uses

func (x *InvocationFinishedTask) String() string

type InvocationsCursor Uses

type InvocationsCursor struct {

    // ID of the last scanned invocation (active or finished).
    //
    // The query will return all IDs that are larger than this one.
    LastScanned int64 `protobuf:"varint,2,opt,name=last_scanned,json=lastScanned,proto3" json:"last_scanned,omitempty"`
    // contains filtered or unexported fields
}

InvocationsCursor is used to paginate results of GetInvocations RPC call.

It is serialized in base64 and sent to the clients. There's no integrity protection: we assume broken cursors are rejected down the call stack.

The internal structure of the cursor is implementation detail and clients must not depend on it.

func (*InvocationsCursor) Descriptor Uses

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

Deprecated: Use InvocationsCursor.ProtoReflect.Descriptor instead.

func (*InvocationsCursor) GetLastScanned Uses

func (x *InvocationsCursor) GetLastScanned() int64

func (*InvocationsCursor) ProtoMessage Uses

func (*InvocationsCursor) ProtoMessage()

func (*InvocationsCursor) ProtoReflect Uses

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

func (*InvocationsCursor) Reset Uses

func (x *InvocationsCursor) Reset()

func (*InvocationsCursor) String Uses

func (x *InvocationsCursor) String() string

type KickTriageTask Uses

type KickTriageTask struct {
    JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
    // contains filtered or unexported fields
}

KickTriageTask can be used to transactionally initiate a new triage.

We can't transactionally enqueue TriageJobStateTask, since its throttling mechanism uses memcache and named tasks, which are not available inside transactions. So instead transactions can enqueue KickTriageTask, which in turn will enqueue TriageJobStateTask (with throttling).

Queue: "triages".

func (*KickTriageTask) Descriptor Uses

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

Deprecated: Use KickTriageTask.ProtoReflect.Descriptor instead.

func (*KickTriageTask) GetJobId Uses

func (x *KickTriageTask) GetJobId() string

func (*KickTriageTask) ProtoMessage Uses

func (*KickTriageTask) ProtoMessage()

func (*KickTriageTask) ProtoReflect Uses

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

func (*KickTriageTask) Reset Uses

func (x *KickTriageTask) Reset()

func (*KickTriageTask) String Uses

func (x *KickTriageTask) String() string

type LaunchInvocationTask Uses

type LaunchInvocationTask struct {
    JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
    InvId int64  `protobuf:"varint,2,opt,name=inv_id,json=invId,proto3" json:"inv_id,omitempty"`
    // contains filtered or unexported fields
}

LaunchInvocationTask is used to start running (or retry a lunch of) a single invocation.

It is enqueued non-transactionally, but with the deduplication key.

Queue: "launches".

func (*LaunchInvocationTask) Descriptor Uses

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

Deprecated: Use LaunchInvocationTask.ProtoReflect.Descriptor instead.

func (*LaunchInvocationTask) GetInvId Uses

func (x *LaunchInvocationTask) GetInvId() int64

func (*LaunchInvocationTask) GetJobId Uses

func (x *LaunchInvocationTask) GetJobId() string

func (*LaunchInvocationTask) ProtoMessage Uses

func (*LaunchInvocationTask) ProtoMessage()

func (*LaunchInvocationTask) ProtoReflect Uses

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

func (*LaunchInvocationTask) Reset Uses

func (x *LaunchInvocationTask) Reset()

func (*LaunchInvocationTask) String Uses

func (x *LaunchInvocationTask) String() string

type LaunchInvocationsBatchTask Uses

type LaunchInvocationsBatchTask struct {
    Tasks []*LaunchInvocationTask `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"`
    // contains filtered or unexported fields
}

LaunchInvocationsBatchTask is used to kick off several invocations at once.

It is enqueued transactionally. It fans out into many LaunchInvocationTask.

Queue: "batches".

func (*LaunchInvocationsBatchTask) Descriptor Uses

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

Deprecated: Use LaunchInvocationsBatchTask.ProtoReflect.Descriptor instead.

func (*LaunchInvocationsBatchTask) GetTasks Uses

func (x *LaunchInvocationsBatchTask) GetTasks() []*LaunchInvocationTask

func (*LaunchInvocationsBatchTask) ProtoMessage Uses

func (*LaunchInvocationsBatchTask) ProtoMessage()

func (*LaunchInvocationsBatchTask) ProtoReflect Uses

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

func (*LaunchInvocationsBatchTask) Reset Uses

func (x *LaunchInvocationsBatchTask) Reset()

func (*LaunchInvocationsBatchTask) String Uses

func (x *LaunchInvocationsBatchTask) String() string

type ReadProjectConfigTask Uses

type ReadProjectConfigTask struct {
    ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
    // contains filtered or unexported fields
}

ReadProjectConfigTask is used to import jobs of some project.

Queue: "read-project-config".

func (*ReadProjectConfigTask) Descriptor Uses

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

Deprecated: Use ReadProjectConfigTask.ProtoReflect.Descriptor instead.

func (*ReadProjectConfigTask) GetProjectId Uses

func (x *ReadProjectConfigTask) GetProjectId() string

func (*ReadProjectConfigTask) ProtoMessage Uses

func (*ReadProjectConfigTask) ProtoMessage()

func (*ReadProjectConfigTask) ProtoReflect Uses

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

func (*ReadProjectConfigTask) Reset Uses

func (x *ReadProjectConfigTask) Reset()

func (*ReadProjectConfigTask) String Uses

func (x *ReadProjectConfigTask) String() string

type ScheduleTimersTask Uses

type ScheduleTimersTask struct {
    JobId  string   `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
    InvId  int64    `protobuf:"varint,2,opt,name=inv_id,json=invId,proto3" json:"inv_id,omitempty"`
    Timers []*Timer `protobuf:"bytes,3,rep,name=timers,proto3" json:"timers,omitempty"`
    // contains filtered or unexported fields
}

ScheduleTimersTask adds a bunch of delayed invocation calls.

It is enqueued transactionally. Results in a bunch of TimerTask calls.

Queue: "timers".

func (*ScheduleTimersTask) Descriptor Uses

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

Deprecated: Use ScheduleTimersTask.ProtoReflect.Descriptor instead.

func (*ScheduleTimersTask) GetInvId Uses

func (x *ScheduleTimersTask) GetInvId() int64

func (*ScheduleTimersTask) GetJobId Uses

func (x *ScheduleTimersTask) GetJobId() string

func (*ScheduleTimersTask) GetTimers Uses

func (x *ScheduleTimersTask) GetTimers() []*Timer

func (*ScheduleTimersTask) ProtoMessage Uses

func (*ScheduleTimersTask) ProtoMessage()

func (*ScheduleTimersTask) ProtoReflect Uses

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

func (*ScheduleTimersTask) Reset Uses

func (x *ScheduleTimersTask) Reset()

func (*ScheduleTimersTask) String Uses

func (x *ScheduleTimersTask) String() string

type Timer Uses

type Timer struct {

    // Unique in time identifier of this timer, auto-generated.
    //
    // It is used to deduplicate and hence provide idempotency for adding
    // timers.
    //
    // Set by the engine, can't be overridden.
    Id  string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
    // Timestamp when the timer was created.
    //
    // Set by the engine, can't be overridden.
    Created *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
    // Target time when this timer activates.
    //
    // Should be provided by whoever emits the timer.
    Eta *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=eta,proto3" json:"eta,omitempty"`
    // User friendly name for this timer that shows up in UI.
    //
    // Can be provided by whoever emits the timer. Doesn't have to be unique.
    Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
    // Arbitrary optional payload passed verbatim to the invocation.
    Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
    // contains filtered or unexported fields
}

Timer can be emitted by any invocation if it wants to be poked later.

Timers are scoped to single invocation and owned by it, so we don't include invocation reference here. It is always available from the context of calls.

func (*Timer) Descriptor Uses

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

Deprecated: Use Timer.ProtoReflect.Descriptor instead.

func (*Timer) GetCreated Uses

func (x *Timer) GetCreated() *timestamppb.Timestamp

func (*Timer) GetEta Uses

func (x *Timer) GetEta() *timestamppb.Timestamp

func (*Timer) GetId Uses

func (x *Timer) GetId() string

func (*Timer) GetPayload Uses

func (x *Timer) GetPayload() []byte

func (*Timer) GetTitle Uses

func (x *Timer) GetTitle() string

func (*Timer) ProtoMessage Uses

func (*Timer) ProtoMessage()

func (*Timer) ProtoReflect Uses

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

func (*Timer) Reset Uses

func (x *Timer) Reset()

func (*Timer) String Uses

func (x *Timer) String() string

type TimerList Uses

type TimerList struct {
    Timers []*Timer `protobuf:"bytes,1,rep,name=timers,proto3" json:"timers,omitempty"`
    // contains filtered or unexported fields
}

TimerList is what we store in datastore entities.

func (*TimerList) Descriptor Uses

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

Deprecated: Use TimerList.ProtoReflect.Descriptor instead.

func (*TimerList) GetTimers Uses

func (x *TimerList) GetTimers() []*Timer

func (*TimerList) ProtoMessage Uses

func (*TimerList) ProtoMessage()

func (*TimerList) ProtoReflect Uses

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

func (*TimerList) Reset Uses

func (x *TimerList) Reset()

func (*TimerList) String Uses

func (x *TimerList) String() string

type TimerTask Uses

type TimerTask struct {
    JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
    InvId int64  `protobuf:"varint,2,opt,name=inv_id,json=invId,proto3" json:"inv_id,omitempty"`
    Timer *Timer `protobuf:"bytes,3,opt,name=timer,proto3" json:"timer,omitempty"`
    // contains filtered or unexported fields
}

TimerTask corresponds to delayed calls added through AddTimer controller API.

Enqueued either transactionally or not. Deduplicated based on invocation's PendingTimers set: any timers not in the set are silently skipped.

Queue: "timers".

func (*TimerTask) Descriptor Uses

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

Deprecated: Use TimerTask.ProtoReflect.Descriptor instead.

func (*TimerTask) GetInvId Uses

func (x *TimerTask) GetInvId() int64

func (*TimerTask) GetJobId Uses

func (x *TimerTask) GetJobId() string

func (*TimerTask) GetTimer Uses

func (x *TimerTask) GetTimer() *Timer

func (*TimerTask) ProtoMessage Uses

func (*TimerTask) ProtoMessage()

func (*TimerTask) ProtoReflect Uses

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

func (*TimerTask) Reset Uses

func (x *TimerTask) Reset()

func (*TimerTask) String Uses

func (x *TimerTask) String() string

type TriageJobStateTask Uses

type TriageJobStateTask struct {
    JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
    // contains filtered or unexported fields
}

TriageJobStateTask looks at the state of the job and decided what to do next.

Enqueued non-transactionally. It is throttled to run approximately once per second. It looks at pending triggers and recently finished invocations and launches new invocations (or schedules timers to do it later).

Queue: "triages".

func (*TriageJobStateTask) Descriptor Uses

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

Deprecated: Use TriageJobStateTask.ProtoReflect.Descriptor instead.

func (*TriageJobStateTask) GetJobId Uses

func (x *TriageJobStateTask) GetJobId() string

func (*TriageJobStateTask) ProtoMessage Uses

func (*TriageJobStateTask) ProtoMessage()

func (*TriageJobStateTask) ProtoReflect Uses

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

func (*TriageJobStateTask) Reset Uses

func (x *TriageJobStateTask) Reset()

func (*TriageJobStateTask) String Uses

func (x *TriageJobStateTask) String() string

type Trigger Uses

type Trigger struct {

    // Unique in time identifier of the trigger.
    //
    // It is used to deduplicate and hence provide idempotency for adding
    // a trigger. Must be provided by whoever emits the trigger.
    Id  string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
    // ID of a job that emitted this trigger or "" if emitted by the engine.
    //
    // Set by the engine, can't be overridden.
    JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
    // ID of an invocation that emitted this trigger or 0 if emitted by the
    // engine.
    //
    // Set by the engine, can't be overridden.
    InvocationId int64 `protobuf:"varint,3,opt,name=invocation_id,json=invocationId,proto3" json:"invocation_id,omitempty"`
    // Timestamp when the trigger was created.
    //
    // Can be set by whoever emits the trigger if the trigger is based on some
    // external event. If not provided, the engine will set it to the current
    // time.
    //
    // Together with 'order_in_batch' used for weak ordering of triggers that
    // aren't directly comparable (e.g. git commits from different repositories).
    // This ordering shouldn't be considered reliable.
    Created *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created,proto3" json:"created,omitempty"`
    // If a bunch of triggers were emitted at the same moment in time (for example
    // through a single RPC or by a single invocation in a tight loop), a trigger
    // with smaller 'order_in_batch' is considered to be older. Value of
    // 'order_in_batch' for triggers with different 'created' timestamps are not
    // comparable.
    //
    // Should be set by whoever emits the trigger if 'created' timestamp was
    // supplied explicitly. Otherwise will be set by the engine based on the order
    // of EmitTrigger calls done by the invocation.
    //
    // Together with 'order_in_batch' used for weak ordering of triggers that
    // aren't directly comparable (e.g. git commits from different repositories).
    // This ordering shouldn't be considered reliable.
    OrderInBatch int64 `protobuf:"varint,7,opt,name=order_in_batch,json=orderInBatch,proto3" json:"order_in_batch,omitempty"`
    // User friendly name for this trigger that shows up in UI.
    //
    // Can be provided by whoever emits the trigger. Doesn't have to be unique.
    Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"`
    // Optional HTTP link to display in UI.
    //
    // Can be provided by whoever emits the trigger. Doesn't have to be unique.
    Url string `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"`
    // For triggers emitted through public API or "Trigger" button, contains
    // identity of a user who submitted this trigger.
    //
    // Empty for triggers emitted by the service itself.
    EmittedByUser string `protobuf:"bytes,8,opt,name=emitted_by_user,json=emittedByUser,proto3" json:"emitted_by_user,omitempty"`
    // Actual trigger data that depends on type of the trigger.
    //
    // 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 the engine itself (e.g. on a schedule) or by triggering tasks (such as Gitiles tasks).

One or multiple triggers are consumed to initiate a new invocation which has access to the properties of consumed triggers. For example, Buildbucket task knows about triggers produced by Gitiles tasks.

This message is an internal representation of the trigger, as stored in the datastore. See also triggers.Trigger for public representation used in API calls.

func NoopTrigger Uses

func NoopTrigger(id, data string) Trigger

NoopTrigger constructs a noop trigger proto with given ID and data payload.

No other fields are populated.

func (*Trigger) Descriptor Uses

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

Deprecated: Use Trigger.ProtoReflect.Descriptor instead.

func (*Trigger) GetBuildbucket Uses

func (x *Trigger) GetBuildbucket() *v1.BuildbucketTrigger

func (*Trigger) GetCreated Uses

func (x *Trigger) GetCreated() *timestamppb.Timestamp

func (*Trigger) GetCron Uses

func (x *Trigger) GetCron() *v1.CronTrigger

func (*Trigger) GetEmittedByUser Uses

func (x *Trigger) GetEmittedByUser() string

func (*Trigger) GetGitiles Uses

func (x *Trigger) GetGitiles() *v1.GitilesTrigger

func (*Trigger) GetId Uses

func (x *Trigger) GetId() string

func (*Trigger) GetInvocationId Uses

func (x *Trigger) GetInvocationId() int64

func (*Trigger) GetJobId Uses

func (x *Trigger) GetJobId() string

func (*Trigger) GetNoop Uses

func (x *Trigger) GetNoop() *v1.NoopTrigger

func (*Trigger) GetOrderInBatch Uses

func (x *Trigger) GetOrderInBatch() int64

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() *v1.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 TriggerList Uses

type TriggerList struct {
    Triggers []*Trigger `protobuf:"bytes,1,rep,name=triggers,proto3" json:"triggers,omitempty"`
    // contains filtered or unexported fields
}

TriggerList is what we store in datastore entities.

func (*TriggerList) Descriptor Uses

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

Deprecated: Use TriggerList.ProtoReflect.Descriptor instead.

func (*TriggerList) GetTriggers Uses

func (x *TriggerList) GetTriggers() []*Trigger

func (*TriggerList) ProtoMessage Uses

func (*TriggerList) ProtoMessage()

func (*TriggerList) ProtoReflect Uses

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

func (*TriggerList) Reset Uses

func (x *TriggerList) Reset()

func (*TriggerList) String Uses

func (x *TriggerList) String() string

type Trigger_Buildbucket Uses

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

type Trigger_Cron Uses

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

type Trigger_Gitiles Uses

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

type Trigger_Noop Uses

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

type Trigger_Webui Uses

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

type UnimplementedAdminServer Uses

type UnimplementedAdminServer struct {
}

UnimplementedAdminServer must be embedded to have forward compatible implementations.

func (UnimplementedAdminServer) GetDebugJobState Uses

func (UnimplementedAdminServer) GetDebugJobState(context.Context, *v1.JobRef) (*DebugJobState, error)

type UnsafeAdminServer Uses

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

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

Package internal imports 14 packages (graph) and is imported by 22 packages. Updated 2020-10-28. Refresh now. Tools for package owners.