Documentation
¶
Index ¶
- type Options
- type RegistrationClient
- type RegistrationOptions
- type Service
- func (s *Service) ConsumeQueue(ctx context.Context, broker executor.QueueBroker, queue string, ...) error
- func (s *Service) Descriptor(base workerproto.WorkerDescriptor) workerproto.WorkerDescriptor
- func (s *Service) Enabled() bool
- func (s *Service) Handler() http.Handler
- func (s *Service) MaintainRegistration(ctx context.Context, opts RegistrationOptions) error
- func (s *Service) RegisterExecutor(exec executor.Executor) error
- func (s *Service) Registry() *executor.Registry
- func (s *Service) UnitRegistry() *workerunit.Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Enabled bool
RegisterBuiltins bool
Registry *executor.Registry
UnitRegistry *workerunit.Registry
CredentialResolver credential.Resolver
}
type RegistrationClient ¶
type RegistrationClient struct {
// contains filtered or unexported fields
}
func NewRegistrationClient ¶
func NewRegistrationClient(client *http.Client) *RegistrationClient
func (*RegistrationClient) Heartbeat ¶
func (c *RegistrationClient) Heartbeat(ctx context.Context, schedulerEndpoint, workerID string) error
func (*RegistrationClient) Register ¶
func (c *RegistrationClient) Register(ctx context.Context, schedulerEndpoint string, worker workerproto.WorkerDescriptor) error
type RegistrationOptions ¶
type RegistrationOptions struct {
SchedulerEndpoint string
Descriptor workerproto.WorkerDescriptor
Interval time.Duration
Client *RegistrationClient
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the embedded worker runtime. It can be disabled when the deployment wants the scheduler to delegate execution to standalone worker processes only.
func NewService ¶
func (*Service) ConsumeQueue ¶
func (*Service) Descriptor ¶
func (s *Service) Descriptor(base workerproto.WorkerDescriptor) workerproto.WorkerDescriptor
func (*Service) MaintainRegistration ¶
func (s *Service) MaintainRegistration(ctx context.Context, opts RegistrationOptions) error
func (*Service) UnitRegistry ¶
func (s *Service) UnitRegistry() *workerunit.Registry
Source Files
¶
Click to show internal directories.
Click to hide internal directories.