Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotHandled = errors.New("message not handled")
)
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { // HandleWrp is called whenever a message is received that matches the // criteria associated with the handler. // // Unless the error of ErrNotHandled is returned, the handler is // considered to have consumed the message. It is up to the handler to // perform any responses or further actions. HandleWrp(wrp.Message) error }
Handler interface is used to handle wrp messages in the system in a consistent way.
type HandlerFunc ¶
type HandlerFunc func(wrp.Message) error
HandlerFunc is an adapter to allow the use of ordinary functions as handlers.
func (HandlerFunc) HandleWrp ¶
func (f HandlerFunc) HandleWrp(msg wrp.Message) error
Click to show internal directories.
Click to hide internal directories.