notifier

package module
v0.0.0-...-6d7193a Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

go-notifier

license card go version go report codecov report workflow Go Reference build docs lasted release

Contribute and Support

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Notification

func Notification(name string, data any)

Notification a event by name and data.

func Register

func Register(name string, e *Event)

Register one event to notifier.

func UnRegister

func UnRegister(name string, e *Event)

UnRegister one event from notifier.

Types

type Event

type Event struct {
	// Name for event.
	Name string
	// Watch for event.
	// *Event the event.
	// any the event data.
	Watch func(*Event, any)
}

Event notifier event.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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