router

package
v0.6.17 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register[T any](r Router, eventType string, handler TypedHandler[T])

Register ...

Types

type Router

type Router interface {
	Register(eventType string, eventTypeHandler internal.Handler)
	HandlerFunc(ctx context.Context, evt *event.Event) error
}

Router ...

func NewRouter

func NewRouter(warnAboutUnknownTypes bool) Router

NewRouter ...

type TypedHandler

type TypedHandler[T any] func(ctx context.Context, evt event.Typed[T]) error

TypedHandler ...

Jump to

Keyboard shortcuts

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