Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyEventName is returned when an empty event name is provided while subscribing. ErrEmptyEventName = errors.New("event name cannot be empty") // ErrBusNotRunning is returned when an operation is performed on a localBus that is not running. ErrBusNotRunning = errors.New("bus is not running") // ErrBusAlreadyRunning is returned when the localBus is already running. ErrBusAlreadyRunning = errors.New("bus is already running") )
Functions ¶
func NewLocalBus ¶
NewLocalBus creates a new localBus instance and configures it with the given options.
Types ¶
type Option ¶
type Option func(bus *localBus)
Option is a function that configures a localBus
func WithBufferSize ¶
WithBufferSize sets the size of the event buffer. If the buffer is full, Publish will block until there is space in the buffer.
func WithContext ¶ added in v0.5.1
func WithLogger ¶
WithLogger sets the logger to use by the localBus.
Click to show internal directories.
Click to hide internal directories.