buildbucket_taskbackend

package
v0.0.0-...-aa40c24 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

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

CancelTasks implements TaskBackendServer.

func (*TaskBackend) FetchTasks

FetchTasks implements TaskBackendServer.

func (*TaskBackend) RunTask

RunTask implements TaskBackendServer.

func (*TaskBackend) ValidateConfigs

ValidateConfigs implements TaskBackendServer.

Jump to

Keyboard shortcuts

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