event

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEventFromMsg

func GetEventFromMsg(data []byte) (*model.Envelope, error)

func StartEventHandlers

func StartEventHandlers(ctx context.Context, conf config.Config, wg *sync.WaitGroup) error

Types

type HandlerFunc

type HandlerFunc func(ctx context.Context, event model.HandlerContext) error

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) GetHandler

func (r *Registry) GetHandler(eventName string) HandlerFunc

func (*Registry) Register

func (r *Registry) Register(eventName string, f HandlerFunc)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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