Documentation
¶
Index ¶
- Constants
- func Publish(bus *Bus, event any)
- func PublishContext(ctx context.Context, bus *Bus, event any) bool
- func PublishTry(bus *Bus, event any) bool
- func Subscribe[E any](bus *Bus, handler Handler[E]) (unsubscribe func())
- func SubscribeAll(bus *Bus, handler Handler[any]) (unsubscribe func())
- func SubscribeAllFunc(bus *Bus, handler func(ctx context.Context, evt any)) (unsubscribe func())
- func SubscribeFunc[E any](bus *Bus, handler func(ctx context.Context, evt E)) (unsubscribe func())
- func WithChan(events chan any) func(*Bus)
- func WithQueueLength(length int) func(*Bus)
- type Bus
- type Handler
Constants ¶
View Source
const DefaultQueueLength = 10
Variables ¶
This section is empty.
Functions ¶
func PublishTry ¶
func SubscribeAll ¶
func SubscribeAllFunc ¶
func SubscribeFunc ¶
func WithQueueLength ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.