events

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const QueueEvents = "events"

Variables

This section is empty.

Functions

func Subscribe

func Subscribe(kind string, h Handler)

Types

type Emitter

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

func New

func New(pool *pgxpool.Pool, wks *workers.Workers, opts ...Option) (*Emitter, error)

func (*Emitter) Emit

func (e *Emitter) Emit(ctx context.Context, tx pgx.Tx, ev Event, opts ...river.InsertOpts) error

type Event

type Event struct {
	Kind string

	WorkspaceID uuid.UUID

	Payload []byte

	IDempotencyKey string
}

type Handler

type Handler func(ctx context.Context, ev Event) error

type Option

type Option func(*river.Config)

Jump to

Keyboard shortcuts

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