localbus

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocalBus

func NewLocalBus(options ...Option) eventbus.EventBus

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

func WithBufferSize(size int) Option

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 WithContext(ctx context.Context) Option

func WithLogger

func WithLogger(logger logger.Logger) Option

WithLogger sets the logger to use by the localBus.

Jump to

Keyboard shortcuts

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