worker

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRPCEndpoint = "https://grpc.cirrus-ci.com:443"
)

Variables

View Source
var (
	ErrWorker   = errors.New("worker failed")
	ErrShutdown = errors.New("worker is shutting down")
)

Functions

This section is empty.

Types

type Option

type Option func(*Worker)

func WithLabels

func WithLabels(labels map[string]string) Option

func WithName

func WithName(name string) Option

func WithRPCEndpoint

func WithRPCEndpoint(rpcEndpoint string) Option

func WithRegistrationToken

func WithRegistrationToken(registrationToken string) Option

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) (*Worker, error)

func (*Worker) GetRequestMetadata

func (worker *Worker) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)

PerRPCCredentials interface implementation.

func (*Worker) RequireTransportSecurity

func (worker *Worker) RequireTransportSecurity() bool

PerRPCCredentials interface implementation.

func (*Worker) Run

func (worker *Worker) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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