Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
Callback function for asynchronous event handling.
type Handler ¶
Handler describes a command handler
type HandlerFunc ¶
HandlerFunc describes a function implementation.
func (HandlerFunc) Handle ¶
func (f HandlerFunc) Handle(ctx context.Context, req interface{}) (interface{}, error)
Handle call the wrapped function
type Reactor ¶
type Reactor interface { // Send the reques to the reactor as an asynchronous call. Send(ctx context.Context, req interface{}, cb Callback) error // Do the request as a synchronous call. Do(ctx context.Context, req interface{}) (interface{}, error) // Register a message type handler RegisterHandler(msg interface{}, fn Handler) }
Reactor defines reactor contract.
Click to show internal directories.
Click to hide internal directories.