Documentation ¶
Index ¶
- func BytesToStr(b []byte) string
- func StrToBytes(s string) (b []byte)
- type Option
- func WithAddr(addr string) Option
- func WithBlockTime(m time.Duration) Option
- func WithCluster(enable bool) Option
- func WithConnectionString(connectionString string) Option
- func WithConsumer(name string) Option
- func WithDB(db int) Option
- func WithGroup(name string) Option
- func WithLogger(l queue.Logger) Option
- func WithMaxLength(m int64) Option
- func WithPassword(passwd string) Option
- func WithRunFunc(fn func(context.Context, core.QueuedMessage) error) Option
- func WithStreamName(name string) Option
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToStr ¶
BytesToStr converts byte slice to a string without memory allocation. See https://groups.google.com/forum/#!msg/Golang-Nuts/ENgbUzYvCuU/90yGx7GUAgAJ .
Note it may break if string and/or slice header will change in the future go versions.
func StrToBytes ¶
StrToBytes converts string to byte slice without a memory allocation.
Types ¶
type Option ¶
type Option func(*options)
Option for queue system
func WithBlockTime ¶ added in v0.0.3
WithBlockTime setup the block time for publish messages we use the block command to make sure if no entry is found we wait until an entry is found
func WithConnectionString ¶
WithConnectionString redis connection string
func WithMaxLength ¶ added in v0.0.3
WithMaxLength setup the max length for publish messages
func WithRunFunc ¶
WithRunFunc setup the run func of queue
Click to show internal directories.
Click to hide internal directories.