event

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 5 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEventTypeNotFound = errors.New("event type not found")
)

Functions

This section is empty.

Types

type ChannelQueue

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

func NewChannelQueue

func NewChannelQueue() *ChannelQueue

func (ChannelQueue) Pop

func (q ChannelQueue) Pop(events map[EventType]reflect.Type) (Event, error)

func (ChannelQueue) Push

func (q ChannelQueue) Push(e Event) error

type Event

type Event interface {
	Type() EventType
	WithContext(ctx context.Context)
	Context(ctx context.Context) context.Context
}

type EventLogger added in v0.5.0

type EventLogger struct {
}

func (*EventLogger) Context added in v0.5.0

func (e *EventLogger) Context(ctx context.Context) context.Context

func (*EventLogger) WithContext added in v0.5.0

func (e *EventLogger) WithContext(ctx context.Context)

type EventType

type EventType string

type Queue

type Queue interface {
	Push(e Event) error
	Pop(events map[EventType]reflect.Type) (Event, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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