Back to godoc.org

Package backend

v0.0.0-...-bd98d2d
Latest Go to latest

The latest major version is .

Published: Sep 19, 2020 | License: BSD-3-Clause | Module: chromium.googlesource.com/infra/infra.git

Overview

Package backend implements the core logic of Arquebus service.

Index

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

func GetAllAssigners

func GetAllAssigners(c context.Context) ([]*model.Assigner, error)

GetAllAssigners returns all assigners.

func GetAssigner

func GetAssigner(c context.Context, aid string) (*model.Assigner, error)

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 UpdateAssigners

func UpdateAssigners(c context.Context, cfgs []*config.Assigner, rev string) error

UpdateAssigners updates all the Assigner entities, based on the configs, and remove the assigners of which configs no longer exist.

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

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

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier