subs

package
v0.0.0-...-336a935 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetEntries      = "get_entries"
	EntriesReceived = "entries_received"
	SaveNewEntry    = "save_new_entry"
	RemoveEntry     = "remove_entry"
	FilterEntries   = "filter_entries"
)

Variables

View Source
var EventChannel chan Event

Functions

func NewEventListener

func NewEventListener() chan Event

func Subscribe

func Subscribe(eventType string, handler EventHandler)

func Subscriptions

func Subscriptions(cli client.Client)

Types

type Event

type Event struct {
	Type string
	Data map[string]interface{}
}

type EventHandler

type EventHandler func(e Event) error

Jump to

Keyboard shortcuts

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