Documentation ¶
Index ¶
Constants ¶
const ( // DefaultRetries represents the default amount of retry attempts DefaultRetries = 5 // DefaultTimeout represents the default timeout when awaiting a "sync" command to complete DefaultTimeout = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupOption ¶
type GroupOption interface {
Apply(*GroupOptions)
}
GroupOption sets options such as topic definitions and timeouts
func NewTopic ¶
func NewTopic(name string, dialect types.Dialect, t types.MessageType, m types.TopicMode) GroupOption
NewTopic constructs a new commander topic for the given name, type, mode and dialect. If no topic mode is defined is the default mode (consume|produce) assigned to the topic.
type GroupOptions ¶
GroupOptions represent the available set of group options
func NewGroupOptions ¶
func NewGroupOptions(options []GroupOption) (result *GroupOptions)
NewGroupOptions applies the given serve options to construct a new group options definition
type HandlerOption ¶
type HandlerOption interface {
Apply(*HandlerOptions)
}
HandlerOption sets options such as codec interfaces and timeouts
type HandlerOptions ¶
type HandlerOptions struct { Action string MessageType types.MessageType Callback types.HandlerFunc }
HandlerOptions represent the available set of handle options
func NewHandlerOptions ¶
func NewHandlerOptions(options []HandlerOption) (result *HandlerOptions)
NewHandlerOptions applies the given serve options to construct a new handle options definition
type ServerOption ¶
type ServerOption interface {
Apply(*ServerOptions)
}
ServerOption sets options such as timeouts, codec and retries
type ServerOptions ¶
ServerOptions represent the available set of server options
func NewServerOptions ¶
func NewServerOptions(options []ServerOption) (result *ServerOptions)
NewServerOptions applies the given serve options to construct a new server options definition