Documentation
¶
Index ¶
- Constants
- Variables
- type Option
- func WithAgentEndpoint(agentEndpoint endpoint.Endpoint) Option
- func WithLabels(labels map[string]string) Option
- func WithLogger(logger logrus.FieldLogger) Option
- func WithName(name string) Option
- func WithRPCEndpoint(rpcEndpoint string) Option
- func WithRegistrationToken(registrationToken string) Option
- type Worker
- func (worker *Worker) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
- func (worker *Worker) Pause(ctx context.Context, wait bool) error
- func (worker *Worker) RequireTransportSecurity() bool
- func (worker *Worker) Resume(ctx context.Context) error
- func (worker *Worker) Run(ctx context.Context) error
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 WithAgentEndpoint ¶ added in v0.71.4
func WithLabels ¶
func WithLogger ¶ added in v0.30.0
func WithLogger(logger logrus.FieldLogger) Option
func WithRPCEndpoint ¶
func WithRegistrationToken ¶
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func (*Worker) GetRequestMetadata ¶
func (worker *Worker) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
PerRPCCredentials interface implementation.
func (*Worker) RequireTransportSecurity ¶
PerRPCCredentials interface implementation.
Click to show internal directories.
Click to hide internal directories.