Documentation ¶
Index ¶
- func Handler(buildbucketTarget, taskSchedulerHost string, ...) http.Handler
- func HandlerWith(tb *TaskBackend) http.Handler
- func JobStatusToBuildbucketStatus(status types.JobStatus) buildbucketpb.Status
- func JobToBuildbucketTask(ctx context.Context, job *types.Job, ...) *buildbucketpb.Task
- type TaskBackend
- func (tb *TaskBackend) CancelTasks(ctx context.Context, req *buildbucketpb.CancelTasksRequest) (*buildbucketpb.CancelTasksResponse, error)
- func (tb *TaskBackend) FetchTasks(ctx context.Context, req *buildbucketpb.FetchTasksRequest) (*buildbucketpb.FetchTasksResponse, error)
- func (tb *TaskBackend) RunTask(ctx context.Context, req *buildbucketpb.RunTaskRequest) (*buildbucketpb.RunTaskResponse, error)
- func (tb *TaskBackend) ValidateConfigs(ctx context.Context, req *buildbucketpb.ValidateConfigsRequest) (*buildbucketpb.ValidateConfigsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(buildbucketTarget, taskSchedulerHost string, projectRepoMapping map[string]string, d db.JobDB, bb2 buildbucket.BuildBucketInterface) http.Handler
Handler creates an http.Handler which serves TaskBackend HTTP endpoints.
func HandlerWith ¶
func HandlerWith(tb *TaskBackend) http.Handler
HandlerWith creates an http.Handler which uses the given TaskBackend instance to serve TaskBackend HTTP endpoints.
func JobStatusToBuildbucketStatus ¶
func JobStatusToBuildbucketStatus(status types.JobStatus) buildbucketpb.Status
JobStatusToBuildbucketStatus converts a types.JobStatus to a buildbucketpb.Status.
func JobToBuildbucketTask ¶
func JobToBuildbucketTask(ctx context.Context, job *types.Job, buildbucketTarget, taskSchedulerHost string) *buildbucketpb.Task
JobToBuildbucketTask converts a types.Job to a buildbucketpb.Task.
Types ¶
type TaskBackend ¶
type TaskBackend struct {
// contains filtered or unexported fields
}
TaskBackend implements TaskBackendServer in terms of Task Scheduler Jobs.
func NewTaskBackend ¶
func NewTaskBackend(buildbucketTarget, taskSchedulerHost string, projectRepoMapping map[string]string, d db.JobDB, bb2 buildbucket.BuildBucketInterface) *TaskBackend
NewTaskBackend returns a TaskBackend instance.
func (*TaskBackend) CancelTasks ¶
func (tb *TaskBackend) CancelTasks(ctx context.Context, req *buildbucketpb.CancelTasksRequest) (*buildbucketpb.CancelTasksResponse, error)
CancelTasks implements TaskBackendServer.
func (*TaskBackend) FetchTasks ¶
func (tb *TaskBackend) FetchTasks(ctx context.Context, req *buildbucketpb.FetchTasksRequest) (*buildbucketpb.FetchTasksResponse, error)
FetchTasks implements TaskBackendServer.
func (*TaskBackend) RunTask ¶
func (tb *TaskBackend) RunTask(ctx context.Context, req *buildbucketpb.RunTaskRequest) (*buildbucketpb.RunTaskResponse, error)
RunTask implements TaskBackendServer.
func (*TaskBackend) ValidateConfigs ¶
func (tb *TaskBackend) ValidateConfigs(ctx context.Context, req *buildbucketpb.ValidateConfigsRequest) (*buildbucketpb.ValidateConfigsResponse, error)
ValidateConfigs implements TaskBackendServer.
Click to show internal directories.
Click to hide internal directories.