options

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
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

type GroupOptions struct {
	Timeout time.Duration
	Retries int8
	Topics  []types.Topic
}

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

type ServerOptions struct {
	Timeout time.Duration
	Retries int8
}

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

Jump to

Keyboard shortcuts

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