dispatcher

package
v0.3.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher interface {
	contracts.DispatcherServer
	Start(ctx context.Context) 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

Subscribe handles a subscribe request from a client

func (*DispatcherImpl) Register

func (*DispatcherImpl) SendActionEvent

func (s *DispatcherImpl) SendActionEvent(ctx context.Context, request *contracts.ActionEvent) (*contracts.ActionEventResponse, error)

func (*DispatcherImpl) Start

func (d *DispatcherImpl) Start(ctx context.Context) error

type DispatcherOpt

type DispatcherOpt func(*DispatcherOpts)

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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