backend_event_handler

package
v1.2.87 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 11 Imported by: 5

Documentation

Index

Constants

View Source
const NaturalOrder = 100

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendEventHandler

type BackendEventHandler interface {
	RegisterHandler(handler Handler)
	UnRegisterHandler(handler Handler)
	Handle(ctx context.Context, incoming *model.Event) (*model.Event, errors.ServiceError)
}

func NewBackendEventHandler

func NewBackendEventHandler(authorizationService service.AuthorizationService) BackendEventHandler

type ByOrder

type ByOrder []Handler

func (ByOrder) Len

func (a ByOrder) Len() int

func (ByOrder) Less

func (a ByOrder) Less(i, j int) bool

func (ByOrder) Swap

func (a ByOrder) Swap(i, j int)

type Handler

type Handler struct {
	Id        string
	Name      string
	Fn        HandlerFunc
	Selector  *model.EventSelector
	Order     int
	Finalizes bool
	Sync      bool
	Responds  bool
	Internal  bool
}

type HandlerFunc

type HandlerFunc func(ctx context.Context, event *model.Event) (*model.Event, errors.ServiceError)

Jump to

Keyboard shortcuts

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