dispatcher

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const HeartbeatInterval = 4 * time.Second

Variables

View Source
var ErrWorkerNotFound = fmt.Errorf("worker not found")

Functions

func UnmarshalPayload added in v0.41.0

func UnmarshalPayload[T any](payload interface{}) (T, error)

Types

type Dispatcher

type Dispatcher interface {
	contracts.DispatcherServer
	Start() (func() error, error)
}

type DispatcherImpl

type DispatcherImpl struct {
	contracts.UnimplementedDispatcherServer
	// contains filtered or unexported fields
}

func New

func New(fs ...DispatcherOpt) (*DispatcherImpl, error)

func (*DispatcherImpl) Heartbeat added in v0.18.1

Heartbeat is used to update the last heartbeat time for a worker

func (*DispatcherImpl) Listen

Subscribe handles a subscribe request from a client

func (*DispatcherImpl) ListenV2 added in v0.18.1

ListenV2 is like Listen, but implementation does not include heartbeats. This should only used by SDKs against engine version v0.18.1+

func (*DispatcherImpl) PutOverridesData added in v0.11.0

func (*DispatcherImpl) RefreshTimeout added in v0.28.0

func (*DispatcherImpl) Register

func (*DispatcherImpl) ReleaseSlot added in v0.27.0

func (*DispatcherImpl) SendGroupKeyActionEvent added in v0.8.0

func (s *DispatcherImpl) SendGroupKeyActionEvent(ctx context.Context, request *contracts.GroupKeyActionEvent) (*contracts.ActionEventResponse, error)

func (*DispatcherImpl) SendStepActionEvent added in v0.8.0

func (s *DispatcherImpl) SendStepActionEvent(ctx context.Context, request *contracts.StepActionEvent) (*contracts.ActionEventResponse, error)

func (*DispatcherImpl) Start

func (d *DispatcherImpl) Start() (func() error, error)

func (*DispatcherImpl) SubscribeToWorkflowEvents added in v0.9.0

func (*DispatcherImpl) SubscribeToWorkflowRuns added in v0.21.0

func (s *DispatcherImpl) SubscribeToWorkflowRuns(server contracts.Dispatcher_SubscribeToWorkflowRunsServer) error

SubscribeToWorkflowEvents registers workflow events with the dispatcher

func (*DispatcherImpl) UpsertWorkerLabels added in v0.40.0

type DispatcherOpt

type DispatcherOpt func(*DispatcherOpts)

func WithAlerter added in v0.16.1

func WithAlerter(a hatcheterrors.Alerter) DispatcherOpt

func WithCache added in v0.41.0

func WithCache(cache cache.Cacheable) DispatcherOpt

func WithDispatcherId

func WithDispatcherId(dispatcherId string) DispatcherOpt

func WithEntitlementsRepository added in v0.31.0

func WithEntitlementsRepository(r repository.EntitlementsRepository) DispatcherOpt

func WithLogger

func WithLogger(l *zerolog.Logger) DispatcherOpt

func WithMessageQueue added in v0.16.0

func WithMessageQueue(mq msgqueue.MessageQueue) DispatcherOpt

type DispatcherOpts

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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