worker

package
v0.50.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: MPL-2.0 Imports: 19 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 WithLogger added in v0.30.0

func WithLogger(logger logrus.FieldLogger) 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