Documentation ¶
Index ¶
- Variables
- func AddCtxHandler(implName string, handler HandlerFunc)
- func AddEventListener(handler HandlerFunc)
- func AddHandler(implName string, handler HandlerFunc)
- func AddWildcardListener(handler HandlerFunc)
- func ClearBusHandlers()
- func Dispatch(msg Msg) error
- func DispatchCtx(ctx context.Context, msg Msg) error
- func Publish(msg Msg) error
- type Bus
- type CtxHandlerFunc
- type HandlerFunc
- type InProcBus
- func (b *InProcBus) AddCtxHandler(handler HandlerFunc)
- func (b *InProcBus) AddEventListener(handler HandlerFunc)
- func (b *InProcBus) AddHandler(handler HandlerFunc)
- func (b *InProcBus) AddWildcardListener(handler HandlerFunc)
- func (b *InProcBus) Dispatch(msg Msg) error
- func (b *InProcBus) DispatchCtx(ctx context.Context, msg Msg) error
- func (b *InProcBus) Publish(msg Msg) error
- type Msg
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHandlerNotFound = errors.New("handler not found")
Functions ¶
func AddCtxHandler ¶
func AddCtxHandler(implName string, handler HandlerFunc)
Package level functions
func AddWildcardListener ¶
func AddWildcardListener(handler HandlerFunc)
func ClearBusHandlers ¶
func ClearBusHandlers()
Types ¶
type Bus ¶
type Bus interface { Dispatch(msg Msg) error DispatchCtx(ctx context.Context, msg Msg) error Publish(msg Msg) error AddHandler(handler HandlerFunc) AddCtxHandler(handler HandlerFunc) AddEventListener(handler HandlerFunc) AddWildcardListener(handler HandlerFunc) }
type CtxHandlerFunc ¶
type CtxHandlerFunc func()
type HandlerFunc ¶
type HandlerFunc interface{}
type InProcBus ¶
type InProcBus struct {
// contains filtered or unexported fields
}
func (*InProcBus) AddCtxHandler ¶
func (b *InProcBus) AddCtxHandler(handler HandlerFunc)
func (*InProcBus) AddEventListener ¶
func (b *InProcBus) AddEventListener(handler HandlerFunc)
func (*InProcBus) AddHandler ¶
func (b *InProcBus) AddHandler(handler HandlerFunc)
func (*InProcBus) AddWildcardListener ¶
func (b *InProcBus) AddWildcardListener(handler HandlerFunc)
Click to show internal directories.
Click to hide internal directories.