backend_event_handler

package
v1.3.97 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 12 Imported by: 5

Documentation

Index

Constants

View Source
const NaturalOrder = 100

Variables

This section is empty.

Functions

func ShortEventInfo added in v1.3.84

func ShortEventInfo(event *model.Event) string

Types

type BackendEventHandler

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

func NewBackendEventHandler

func NewBackendEventHandler() 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 ExtensionEventSelectorMatcher added in v1.3.84

type ExtensionEventSelectorMatcher struct {
}

func (*ExtensionEventSelectorMatcher) SelectorMatches added in v1.3.84

func (b *ExtensionEventSelectorMatcher) SelectorMatches(incoming *model.Event, selector *model.EventSelector) bool

type Handler

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

type HandlerFunc

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

Jump to

Keyboard shortcuts

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