worker

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventRepo

type EventRepo interface {
	Get(message model.ConsumerMessage) (eventDesc []model.EventMessageDesc, err error)
}

type Marshaller

type Marshaller interface {
	Unmarshal(desc model.EventMessageDesc) (value interface{}, err error)
}

type Notifier

type Notifier interface {
	NotifyError(desc model.EventMessageDesc, err error) error
}

type Trigger

type Trigger interface {
	Trigger(desc model.EventMessageDesc, value interface{}) error
}

type Worker

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

func New

func New(ctx context.Context, wg *sync.WaitGroup, config configuration.Config, eventRepo EventRepo, marshaller Marshaller, trigger Trigger, notifier Notifier) (w *Worker, err error)

func (*Worker) Do

func (this *Worker) Do(msg model.ConsumerMessage) error

func (*Worker) StartStatistics

func (this *Worker) StartStatistics()

Jump to

Keyboard shortcuts

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