event

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangedPayload added in v0.8.0

type ChangedPayload struct {
	Resource string
	Value    any
}

type Event added in v0.5.0

type Event string

func Action added in v0.5.0

func Action(resource string, action string) Event

func Changed added in v0.5.0

func Changed(resource string) Event

type Events

type Events struct {
	// contains filtered or unexported fields
}

func NewEvents

func NewEvents(timeout time.Duration) *Events

func (*Events) Emit

func (events *Events) Emit(event Event, payload any)

func (*Events) Subscribe

func (events *Events) Subscribe(event Event, listener chan<- any)

func (*Events) Unsubscribe

func (events *Events) Unsubscribe(event Event, listener chan<- any)

Jump to

Keyboard shortcuts

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