internal

package
v0.0.0-...-e7509a3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	Admin_GetDebugJobState_FullMethodName = "/internal.admin.Admin/GetDebugJobState"
)

Variables

View Source
var Admin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "internal.admin.Admin",
	HandlerType: (*AdminServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDebugJobState",
			Handler:    _Admin_GetDebugJobState_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "go.chromium.org/luci/scheduler/appengine/internal/admin.proto",
}

Admin_ServiceDesc is the grpc.ServiceDesc for Admin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_go_chromium_org_luci_scheduler_appengine_internal_admin_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_scheduler_appengine_internal_cursors_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_scheduler_appengine_internal_db_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_scheduler_appengine_internal_timers_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_scheduler_appengine_internal_tq_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_scheduler_appengine_internal_triggers_proto protoreflect.FileDescriptor

Functions

func FileDescriptorSet

func FileDescriptorSet() *descriptorpb.FileDescriptorSet

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

Will not return nil.

Do NOT modify the returned descriptor.

func RegisterAdminServer

func RegisterAdminServer(s grpc.ServiceRegistrar, srv AdminServer)

func ToPublicTrigger

func ToPublicTrigger(t *Trigger) *scheduler.Trigger

ToPublicTrigger converts Trigger to public *scheduler.Trigger.

Types

type AdminClient

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.

Admin exposes administrative API usable only by the service owners.

func NewAdminClient

func NewAdminClient(cc grpc.ClientConnInterface) AdminClient

type AdminServer

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.

Admin exposes administrative API usable only by the service owners.

type CronTickTask

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 deprecated

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

Deprecated: Use CronTickTask.ProtoReflect.Descriptor instead.

func (*CronTickTask) GetJobId

func (x *CronTickTask) GetJobId() string

func (*CronTickTask) GetTickNonce

func (x *CronTickTask) GetTickNonce() int64

func (*CronTickTask) ProtoMessage

func (*CronTickTask) ProtoMessage()

func (*CronTickTask) ProtoReflect

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

func (*CronTickTask) Reset

func (x *CronTickTask) Reset()

func (*CronTickTask) String

func (x *CronTickTask) String() string

type DebugJobState

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                  `` /* 128-byte string literal not displayed */
	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 deprecated

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

Deprecated: Use DebugJobState.ProtoReflect.Descriptor instead.

func (*DebugJobState) GetActiveInvocations

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

func (*DebugJobState) GetCronState

func (x *DebugJobState) GetCronState() *DebugJobState_CronState

func (*DebugJobState) GetEnabled

func (x *DebugJobState) GetEnabled() bool

func (*DebugJobState) GetFinishedInvocations

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

func (*DebugJobState) GetLastTriage

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

func (*DebugJobState) GetManagerState

func (x *DebugJobState) GetManagerState() *DebugManagerState

func (*DebugJobState) GetPaused

func (x *DebugJobState) GetPaused() bool

func (*DebugJobState) GetPendingTriggersSet

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

func (*DebugJobState) GetRecentlyFinishedSet

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

func (*DebugJobState) ProtoMessage

func (*DebugJobState) ProtoMessage()

func (*DebugJobState) ProtoReflect

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

func (*DebugJobState) Reset

func (x *DebugJobState) Reset()

func (*DebugJobState) String

func (x *DebugJobState) String() string

type DebugJobState_CronState

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 deprecated

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

Deprecated: Use DebugJobState_CronState.ProtoReflect.Descriptor instead.

func (*DebugJobState_CronState) GetEnabled

func (x *DebugJobState_CronState) GetEnabled() bool

func (*DebugJobState_CronState) GetGeneration

func (x *DebugJobState_CronState) GetGeneration() int64

func (*DebugJobState_CronState) GetLastRewind

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

func (*DebugJobState_CronState) GetLastTickNonce

func (x *DebugJobState_CronState) GetLastTickNonce() int64

func (*DebugJobState_CronState) GetLastTickWhen

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

func (*DebugJobState_CronState) ProtoMessage

func (*DebugJobState_CronState) ProtoMessage()

func (*DebugJobState_CronState) ProtoReflect

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

func (*DebugJobState_CronState) Reset

func (x *DebugJobState_CronState) Reset()

func (*DebugJobState_CronState) String

func (x *DebugJobState_CronState) String() string

type DebugManagerState

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 deprecated

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

Deprecated: Use DebugManagerState.ProtoReflect.Descriptor instead.

func (*DebugManagerState) GetDebugLog

func (x *DebugManagerState) GetDebugLog() string

func (*DebugManagerState) GetError

func (x *DebugManagerState) GetError() string

func (*DebugManagerState) GetGitilesPoller

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

func (*DebugManagerState) ProtoMessage

func (*DebugManagerState) ProtoMessage()

func (*DebugManagerState) ProtoReflect

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

func (*DebugManagerState) Reset

func (x *DebugManagerState) Reset()

func (*DebugManagerState) String

func (x *DebugManagerState) String() string

type EnqueueTriggersTask

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 deprecated

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

Deprecated: Use EnqueueTriggersTask.ProtoReflect.Descriptor instead.

func (*EnqueueTriggersTask) GetJobId

func (x *EnqueueTriggersTask) GetJobId() string

func (*EnqueueTriggersTask) GetTriggers

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

func (*EnqueueTriggersTask) ProtoMessage

func (*EnqueueTriggersTask) ProtoMessage()

func (*EnqueueTriggersTask) ProtoReflect

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

func (*EnqueueTriggersTask) Reset

func (x *EnqueueTriggersTask) Reset()

func (*EnqueueTriggersTask) String

func (x *EnqueueTriggersTask) String() string

type FanOutTriggersTask

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 deprecated

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

Deprecated: Use FanOutTriggersTask.ProtoReflect.Descriptor instead.

func (*FanOutTriggersTask) GetJobIds

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

func (*FanOutTriggersTask) GetTriggers

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

func (*FanOutTriggersTask) ProtoMessage

func (*FanOutTriggersTask) ProtoMessage()

func (*FanOutTriggersTask) ProtoReflect

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

func (*FanOutTriggersTask) Reset

func (x *FanOutTriggersTask) Reset()

func (*FanOutTriggersTask) String

func (x *FanOutTriggersTask) String() string

type FinishedInvocation

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 deprecated

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

Deprecated: Use FinishedInvocation.ProtoReflect.Descriptor instead.

func (*FinishedInvocation) GetFinished

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

func (*FinishedInvocation) GetInvocationId

func (x *FinishedInvocation) GetInvocationId() int64

func (*FinishedInvocation) ProtoMessage

func (*FinishedInvocation) ProtoMessage()

func (*FinishedInvocation) ProtoReflect

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

func (*FinishedInvocation) Reset

func (x *FinishedInvocation) Reset()

func (*FinishedInvocation) String

func (x *FinishedInvocation) String() string

type FinishedInvocationList

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 deprecated

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

Deprecated: Use FinishedInvocationList.ProtoReflect.Descriptor instead.

func (*FinishedInvocationList) GetInvocations

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

func (*FinishedInvocationList) ProtoMessage

func (*FinishedInvocationList) ProtoMessage()

func (*FinishedInvocationList) ProtoReflect

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

func (*FinishedInvocationList) Reset

func (x *FinishedInvocationList) Reset()

func (*FinishedInvocationList) String

func (x *FinishedInvocationList) String() string

type InvocationFinishedTask

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 deprecated

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

Deprecated: Use InvocationFinishedTask.ProtoReflect.Descriptor instead.

func (*InvocationFinishedTask) GetInvId

func (x *InvocationFinishedTask) GetInvId() int64

func (*InvocationFinishedTask) GetJobId

func (x *InvocationFinishedTask) GetJobId() string

func (*InvocationFinishedTask) GetTriggers

func (x *InvocationFinishedTask) GetTriggers() *FanOutTriggersTask

func (*InvocationFinishedTask) ProtoMessage

func (*InvocationFinishedTask) ProtoMessage()

func (*InvocationFinishedTask) ProtoReflect

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

func (*InvocationFinishedTask) Reset

func (x *InvocationFinishedTask) Reset()

func (*InvocationFinishedTask) String

func (x *InvocationFinishedTask) String() string

type InvocationsCursor

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 deprecated

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

Deprecated: Use InvocationsCursor.ProtoReflect.Descriptor instead.

func (*InvocationsCursor) GetLastScanned

func (x *InvocationsCursor) GetLastScanned() int64

func (*InvocationsCursor) ProtoMessage

func (*InvocationsCursor) ProtoMessage()

func (*InvocationsCursor) ProtoReflect

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

func (*InvocationsCursor) Reset

func (x *InvocationsCursor) Reset()

func (*InvocationsCursor) String

func (x *InvocationsCursor) String() string

type KickTriageTask

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 deprecated

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

Deprecated: Use KickTriageTask.ProtoReflect.Descriptor instead.

func (*KickTriageTask) GetJobId

func (x *KickTriageTask) GetJobId() string

func (*KickTriageTask) ProtoMessage

func (*KickTriageTask) ProtoMessage()

func (*KickTriageTask) ProtoReflect

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

func (*KickTriageTask) Reset

func (x *KickTriageTask) Reset()

func (*KickTriageTask) String

func (x *KickTriageTask) String() string

type LaunchInvocationTask

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 deprecated

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

Deprecated: Use LaunchInvocationTask.ProtoReflect.Descriptor instead.

func (*LaunchInvocationTask) GetInvId

func (x *LaunchInvocationTask) GetInvId() int64

func (*LaunchInvocationTask) GetJobId

func (x *LaunchInvocationTask) GetJobId() string

func (*LaunchInvocationTask) ProtoMessage

func (*LaunchInvocationTask) ProtoMessage()

func (*LaunchInvocationTask) ProtoReflect

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

func (*LaunchInvocationTask) Reset

func (x *LaunchInvocationTask) Reset()

func (*LaunchInvocationTask) String

func (x *LaunchInvocationTask) String() string

type LaunchInvocationsBatchTask

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 deprecated

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

Deprecated: Use LaunchInvocationsBatchTask.ProtoReflect.Descriptor instead.

func (*LaunchInvocationsBatchTask) GetTasks

func (*LaunchInvocationsBatchTask) ProtoMessage

func (*LaunchInvocationsBatchTask) ProtoMessage()

func (*LaunchInvocationsBatchTask) ProtoReflect

func (*LaunchInvocationsBatchTask) Reset

func (x *LaunchInvocationsBatchTask) Reset()

func (*LaunchInvocationsBatchTask) String

func (x *LaunchInvocationsBatchTask) String() string

type ReadProjectConfigTask

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 deprecated

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

Deprecated: Use ReadProjectConfigTask.ProtoReflect.Descriptor instead.

func (*ReadProjectConfigTask) GetProjectId

func (x *ReadProjectConfigTask) GetProjectId() string

func (*ReadProjectConfigTask) ProtoMessage

func (*ReadProjectConfigTask) ProtoMessage()

func (*ReadProjectConfigTask) ProtoReflect

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

func (*ReadProjectConfigTask) Reset

func (x *ReadProjectConfigTask) Reset()

func (*ReadProjectConfigTask) String

func (x *ReadProjectConfigTask) String() string

type ScheduleTimersTask

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 deprecated

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

Deprecated: Use ScheduleTimersTask.ProtoReflect.Descriptor instead.

func (*ScheduleTimersTask) GetInvId

func (x *ScheduleTimersTask) GetInvId() int64

func (*ScheduleTimersTask) GetJobId

func (x *ScheduleTimersTask) GetJobId() string

func (*ScheduleTimersTask) GetTimers

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

func (*ScheduleTimersTask) ProtoMessage

func (*ScheduleTimersTask) ProtoMessage()

func (*ScheduleTimersTask) ProtoReflect

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

func (*ScheduleTimersTask) Reset

func (x *ScheduleTimersTask) Reset()

func (*ScheduleTimersTask) String

func (x *ScheduleTimersTask) String() string

type Timer

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 deprecated

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

Deprecated: Use Timer.ProtoReflect.Descriptor instead.

func (*Timer) GetCreated

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

func (*Timer) GetEta

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

func (*Timer) GetId

func (x *Timer) GetId() string

func (*Timer) GetPayload

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

func (*Timer) GetTitle

func (x *Timer) GetTitle() string

func (*Timer) ProtoMessage

func (*Timer) ProtoMessage()

func (*Timer) ProtoReflect

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

func (*Timer) Reset

func (x *Timer) Reset()

func (*Timer) String

func (x *Timer) String() string

type TimerList

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 deprecated

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

Deprecated: Use TimerList.ProtoReflect.Descriptor instead.

func (*TimerList) GetTimers

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

func (*TimerList) ProtoMessage

func (*TimerList) ProtoMessage()

func (*TimerList) ProtoReflect

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

func (*TimerList) Reset

func (x *TimerList) Reset()

func (*TimerList) String

func (x *TimerList) String() string

type TimerTask

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 deprecated

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

Deprecated: Use TimerTask.ProtoReflect.Descriptor instead.

func (*TimerTask) GetInvId

func (x *TimerTask) GetInvId() int64

func (*TimerTask) GetJobId

func (x *TimerTask) GetJobId() string

func (*TimerTask) GetTimer

func (x *TimerTask) GetTimer() *Timer

func (*TimerTask) ProtoMessage

func (*TimerTask) ProtoMessage()

func (*TimerTask) ProtoReflect

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

func (*TimerTask) Reset

func (x *TimerTask) Reset()

func (*TimerTask) String

func (x *TimerTask) String() string

type TriageJobStateTask

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 deprecated

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

Deprecated: Use TriageJobStateTask.ProtoReflect.Descriptor instead.

func (*TriageJobStateTask) GetJobId

func (x *TriageJobStateTask) GetJobId() string

func (*TriageJobStateTask) ProtoMessage

func (*TriageJobStateTask) ProtoMessage()

func (*TriageJobStateTask) ProtoReflect

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

func (*TriageJobStateTask) Reset

func (x *TriageJobStateTask) Reset()

func (*TriageJobStateTask) String

func (x *TriageJobStateTask) String() string

type Trigger

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

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 deprecated

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

Deprecated: Use Trigger.ProtoReflect.Descriptor instead.

func (*Trigger) GetBuildbucket

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

func (*Trigger) GetCreated

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

func (*Trigger) GetCron

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

func (*Trigger) GetEmittedByUser

func (x *Trigger) GetEmittedByUser() string

func (*Trigger) GetGitiles

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

func (*Trigger) GetId

func (x *Trigger) GetId() string

func (*Trigger) GetInvocationId

func (x *Trigger) GetInvocationId() int64

func (*Trigger) GetJobId

func (x *Trigger) GetJobId() string

func (*Trigger) GetNoop

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

func (*Trigger) GetOrderInBatch

func (x *Trigger) GetOrderInBatch() int64

func (*Trigger) GetPayload

func (m *Trigger) GetPayload() isTrigger_Payload

func (*Trigger) GetTitle

func (x *Trigger) GetTitle() string

func (*Trigger) GetUrl

func (x *Trigger) GetUrl() string

func (*Trigger) GetWebui

func (x *Trigger) GetWebui() *v1.WebUITrigger

func (*Trigger) ProtoMessage

func (*Trigger) ProtoMessage()

func (*Trigger) ProtoReflect

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

func (*Trigger) Reset

func (x *Trigger) Reset()

func (*Trigger) String

func (x *Trigger) String() string

type TriggerList

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 deprecated

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

Deprecated: Use TriggerList.ProtoReflect.Descriptor instead.

func (*TriggerList) GetTriggers

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

func (*TriggerList) ProtoMessage

func (*TriggerList) ProtoMessage()

func (*TriggerList) ProtoReflect

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

func (*TriggerList) Reset

func (x *TriggerList) Reset()

func (*TriggerList) String

func (x *TriggerList) String() string

type Trigger_Buildbucket

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

type Trigger_Cron

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

type Trigger_Gitiles

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

type Trigger_Noop

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

type Trigger_Webui

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

type UnimplementedAdminServer

type UnimplementedAdminServer struct{}

UnimplementedAdminServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedAdminServer) GetDebugJobState

type UnsafeAdminServer

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.

Jump to

Keyboard shortcuts

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