registry

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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