Documentation ¶
Overview ¶
Package backend implements the core logic of Arquebus service.
Index ¶
- Constants
- Variables
- func GetAllAssigners(c context.Context) ([]*model.Assigner, error)
- func GetAssigner(c context.Context, aid string) (*model.Assigner, error)
- func GetAssignerWithTasks(c context.Context, assignerID string, limit int32, includeNoopSuccess bool) (assigner *model.Assigner, tasks []*model.Task, err error)
- func GetTask(c context.Context, assignerID string, taskID int64) (*model.Assigner, *model.Task, error)
- func InstallHandlers(r *router.Router, dispatcher *tq.Dispatcher, m router.MiddlewareChain)
- func RemoveNoopTasks(c context.Context, ae *model.Assigner, n int32) error
- func UpdateAssigners(c context.Context, cfgs []*config.Assigner, rev string) error
- type RunAssignerTask
- func (*RunAssignerTask) Descriptor() ([]byte, []int)deprecated
- func (x *RunAssignerTask) GetAssignerId() string
- func (x *RunAssignerTask) GetTaskId() int64
- func (*RunAssignerTask) ProtoMessage()
- func (x *RunAssignerTask) ProtoReflect() protoreflect.Message
- func (x *RunAssignerTask) Reset()
- func (x *RunAssignerTask) String() string
- type ScheduleAssignerTask
- func (*ScheduleAssignerTask) Descriptor() ([]byte, []int)deprecated
- func (x *ScheduleAssignerTask) GetAssignerId() string
- func (*ScheduleAssignerTask) ProtoMessage()
- func (x *ScheduleAssignerTask) ProtoReflect() protoreflect.Message
- func (x *ScheduleAssignerTask) Reset()
- func (x *ScheduleAssignerTask) String() string
Constants ¶
const ( // OptOutLabel stops Arquebus updating the issue, if added. OptOutLabel = "Arquebus-Opt-Out" // IssueUpdateMaxConcurrency is the maximum number of // monorail.UpdateIssue()s that can be invoked in parallel. IssueUpdateMaxConcurrency = 4 )
Variables ¶
var File_infra_appengine_arquebus_app_backend_tq_proto protoreflect.FileDescriptor
Functions ¶
func GetAllAssigners ¶
GetAllAssigners returns all assigners.
func GetAssigner ¶
GetAssigner returns the Assigner matching with a given ID.
func GetAssignerWithTasks ¶
func GetAssignerWithTasks(c context.Context, assignerID string, limit int32, includeNoopSuccess bool) (assigner *model.Assigner, tasks []*model.Task, err error)
GetAssignerWithTasks returns up to |limit| of Task entities for the Assigner in ExpectedStart desc order.
If includeNoopSuccess is true, the return includes the Task entities that were completed successfully without issue updates.
func GetTask ¶
func GetTask(c context.Context, assignerID string, taskID int64) (*model.Assigner, *model.Task, error)
GetTask returns the task entity matching with the assigner and task IDs.
func InstallHandlers ¶
func InstallHandlers(r *router.Router, dispatcher *tq.Dispatcher, m router.MiddlewareChain)
InstallHandlers installs TaskQueue handlers into a given task queue.
func RemoveNoopTasks ¶
RemoveNoopTasks removes a given number of noop tasks.
TODO(crbug.com/967525): remove this once all the existing noop task entities are cleared out.
Types ¶
type RunAssignerTask ¶
type RunAssignerTask struct { AssignerId string `protobuf:"bytes,1,opt,name=assigner_id,json=assignerId,proto3" json:"assigner_id,omitempty"` // the task ID of a scheduled tasks to trigger a run. TaskId int64 `protobuf:"varint,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // contains filtered or unexported fields }
RunAssignerTask is to trigger an assigner run for a given scheduled task.
Queue: "run-assigners".
func (*RunAssignerTask) Descriptor
deprecated
func (*RunAssignerTask) Descriptor() ([]byte, []int)
Deprecated: Use RunAssignerTask.ProtoReflect.Descriptor instead.
func (*RunAssignerTask) GetAssignerId ¶
func (x *RunAssignerTask) GetAssignerId() string
func (*RunAssignerTask) GetTaskId ¶
func (x *RunAssignerTask) GetTaskId() int64
func (*RunAssignerTask) ProtoMessage ¶
func (*RunAssignerTask) ProtoMessage()
func (*RunAssignerTask) ProtoReflect ¶
func (x *RunAssignerTask) ProtoReflect() protoreflect.Message
func (*RunAssignerTask) Reset ¶
func (x *RunAssignerTask) Reset()
func (*RunAssignerTask) String ¶
func (x *RunAssignerTask) String() string
type ScheduleAssignerTask ¶
type ScheduleAssignerTask struct { AssignerId string `protobuf:"bytes,1,opt,name=assigner_id,json=assignerId,proto3" json:"assigner_id,omitempty"` // contains filtered or unexported fields }
ScheduleAssignerTask is to schedule a new task for a given assigner.
Queue: "schedule-assigners".
func (*ScheduleAssignerTask) Descriptor
deprecated
func (*ScheduleAssignerTask) Descriptor() ([]byte, []int)
Deprecated: Use ScheduleAssignerTask.ProtoReflect.Descriptor instead.
func (*ScheduleAssignerTask) GetAssignerId ¶
func (x *ScheduleAssignerTask) GetAssignerId() string
func (*ScheduleAssignerTask) ProtoMessage ¶
func (*ScheduleAssignerTask) ProtoMessage()
func (*ScheduleAssignerTask) ProtoReflect ¶
func (x *ScheduleAssignerTask) ProtoReflect() protoreflect.Message
func (*ScheduleAssignerTask) Reset ¶
func (x *ScheduleAssignerTask) Reset()
func (*ScheduleAssignerTask) String ¶
func (x *ScheduleAssignerTask) String() string