event

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	Name() EventName
}

type EventHandler

type EventHandler interface {
	HandleEvent(database.Database, Event)
}

type EventHandlerFunc

type EventHandlerFunc func(database.Database, Event)

func (EventHandlerFunc) HandleEvent

func (f EventHandlerFunc) HandleEvent(db database.Database, e Event)

type EventName

type EventName string

EventName type

type EventRegistry

type EventRegistry interface {
	RegisterEventHandler(EventName, EventHandler)
	PushEvent(Event)
	Run(ctx context.Context)
}

func NewEventRegistry

func NewEventRegistry(db database.Database) EventRegistry

Jump to

Keyboard shortcuts

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