Versions in this module Expand all Collapse all v1 v1.0.2 Dec 15, 2025 Changes in this version type ProcessingMode + func (pm ProcessingMode) String() string v1.0.1 Dec 14, 2025 Changes in this version + type Event struct + func NewEvent(eventType string, ctx context.Context, options ...EventOption) *Event + func (e *Event) Done(result interface{}, err error) + func (e *Event) GetContext() context.Context + func (e *Event) GetDeadline() time.Time + func (e *Event) GetID() uint64 + func (e *Event) GetTimestamp() time.Time + func (e *Event) GetType() string + func (e *Event) HasDeadline() bool + func (e *Event) IsExpired() bool + func (e *Event) Wait() (interface{}, error) + type EventContext struct + func NewEventContext(ctx context.Context) *EventContext + func (ec *EventContext) Context() context.Context + func (ec *EventContext) Done(result interface{}, err error) + func (ec *EventContext) Wait() (interface{}, error) + type EventHandlerFunc func(ctx context.Context, event IEvent) error + func (f EventHandlerFunc) Handle(ctx context.Context, event IEvent) error + type EventOption func(*Event) + func WithDeadline(deadline time.Time) EventOption + func WithTimeout(timeout time.Duration) EventOption + type EventQueue struct + func NewDefaultEventQueue() *EventQueue + func NewEventQueue(config EventQueueConfig) *EventQueue + func (eq *EventQueue) Enqueue(event IEvent) error + func (eq *EventQueue) GetQueueSize() int + func (eq *EventQueue) RegisterHandler(eventType string, handler IEventHandler) + func (eq *EventQueue) Start(ctx context.Context) error + func (eq *EventQueue) Stop() error + type EventQueueConfig struct + BufferSize int + ProcessingMode ProcessingMode + type IEvent interface + Done func(result interface{}, err error) + GetContext func() context.Context + GetDeadline func() time.Time + GetID func() uint64 + GetTimestamp func() time.Time + GetType func() string + HasDeadline func() bool + IsExpired func() bool + Wait func() (interface{}, error) + type IEventHandler interface + Handle func(ctx context.Context, event IEvent) error + type IEventQueue interface + Enqueue func(event IEvent) error + GetQueueSize func() int + RegisterHandler func(eventType string, handler IEventHandler) + Start func(ctx context.Context) error + Stop func() error + type ProcessingMode int + const Parallel + const Sequential