eventbus

package
v0.0.0-...-fbb17d6 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package eventbus provides an interface for event bus.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event string
const (
	EventLabelMutation    Event = "label.mutation"
	EventLocationMutation Event = "location.mutation"
	EventItemMutation     Event = "item.mutation"
)

type EventBus

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

func New

func New() *EventBus

func (*EventBus) Publish

func (e *EventBus) Publish(event Event, data any)

func (*EventBus) Run

func (e *EventBus) Run(ctx context.Context) error

func (*EventBus) Subscribe

func (e *EventBus) Subscribe(event Event, fn func(any))

type GroupMutationEvent

type GroupMutationEvent struct {
	GID uuid.UUID
}

Jump to

Keyboard shortcuts

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