registry

package
v1.28.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewHandlerFuncs = map[string]NewHandlerFunc{}

NewHandlerFuncs is a map containing all the registered notification handlers.

Functions

func InitHandlers

func InitHandlers(ctx context.Context, handlerConf map[string]map[string]any) map[string]handler.Handler

InitHandlers initializes the notification handlers with the configuration and the log from a service.

func Register

func Register(name string, f NewHandlerFunc)

Register registers a new notification handler new function. Not safe for concurrent use. Safe for use from package init.

Types

type NewHandlerFunc

type NewHandlerFunc func(context.Context, map[string]any) (handler.Handler, error)

NewHandlerFunc is the function that notification handlers should register to at init time.

Jump to

Keyboard shortcuts

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