Documentation ¶
Index ¶
- type Dispatcher
- type DispatcherImpl
- func (d *DispatcherImpl) GetWorker(workerId string) (*subscribedWorker, error)
- func (s *DispatcherImpl) Listen(request *contracts.WorkerListenRequest, ...) error
- func (s *DispatcherImpl) PutOverridesData(ctx context.Context, request *contracts.OverridesData) (*contracts.OverridesDataResponse, error)
- func (s *DispatcherImpl) Register(ctx context.Context, request *contracts.WorkerRegisterRequest) (*contracts.WorkerRegisterResponse, error)
- func (s *DispatcherImpl) SendGroupKeyActionEvent(ctx context.Context, request *contracts.GroupKeyActionEvent) (*contracts.ActionEventResponse, error)
- func (s *DispatcherImpl) SendStepActionEvent(ctx context.Context, request *contracts.StepActionEvent) (*contracts.ActionEventResponse, error)
- func (d *DispatcherImpl) Start() (func() error, error)
- func (s *DispatcherImpl) SubscribeToWorkflowEvents(request *contracts.SubscribeToWorkflowEventsRequest, ...) error
- func (s *DispatcherImpl) Unsubscribe(ctx context.Context, request *contracts.WorkerUnsubscribeRequest) (*contracts.WorkerUnsubscribeResponse, error)
- type DispatcherOpt
- func WithDataDecoderValidator(dv datautils.DataDecoderValidator) DispatcherOpt
- func WithDispatcherId(dispatcherId string) DispatcherOpt
- func WithLogger(l *zerolog.Logger) DispatcherOpt
- func WithRepository(r repository.Repository) DispatcherOpt
- func WithTaskQueue(tq taskqueue.TaskQueue) DispatcherOpt
- type DispatcherOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) GetWorker ¶
func (d *DispatcherImpl) GetWorker(workerId string) (*subscribedWorker, error)
func (*DispatcherImpl) Listen ¶
func (s *DispatcherImpl) Listen(request *contracts.WorkerListenRequest, stream contracts.Dispatcher_ListenServer) error
Subscribe handles a subscribe request from a client
func (*DispatcherImpl) PutOverridesData ¶ added in v0.11.0
func (s *DispatcherImpl) PutOverridesData(ctx context.Context, request *contracts.OverridesData) (*contracts.OverridesDataResponse, error)
func (*DispatcherImpl) Register ¶
func (s *DispatcherImpl) Register(ctx context.Context, request *contracts.WorkerRegisterRequest) (*contracts.WorkerRegisterResponse, error)
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 (s *DispatcherImpl) SubscribeToWorkflowEvents(request *contracts.SubscribeToWorkflowEventsRequest, stream contracts.Dispatcher_SubscribeToWorkflowEventsServer) error
SubscribeToWorkflowEvents registers workflow events with the dispatcher
func (*DispatcherImpl) Unsubscribe ¶
func (s *DispatcherImpl) Unsubscribe(ctx context.Context, request *contracts.WorkerUnsubscribeRequest) (*contracts.WorkerUnsubscribeResponse, error)
type DispatcherOpt ¶
type DispatcherOpt func(*DispatcherOpts)
func WithDataDecoderValidator ¶
func WithDataDecoderValidator(dv datautils.DataDecoderValidator) DispatcherOpt
func WithDispatcherId ¶
func WithDispatcherId(dispatcherId string) DispatcherOpt
func WithLogger ¶
func WithLogger(l *zerolog.Logger) DispatcherOpt
func WithRepository ¶
func WithRepository(r repository.Repository) DispatcherOpt
func WithTaskQueue ¶
func WithTaskQueue(tq taskqueue.TaskQueue) DispatcherOpt
type DispatcherOpts ¶
type DispatcherOpts struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.