Documentation ¶
Index ¶
- Variables
- func IsErrDeserialize(err error) bool
- func IsErrRedisExec(err error) bool
- func IsErrScriptLoad(err error) bool
- func IsErrSerialize(err error) bool
- type Client
- type ClusterProps
- type ErrDeserialize
- type ErrRedisExec
- type ErrScriptLoad
- type ErrSerialize
- type MQueue
- func (m *MQueue) Discard(ctx context.Context, req core.DiscardRequest) error
- func (m *MQueue) Exists(ctx context.Context, req core.ExistsRequest) (bool, error)
- func (m *MQueue) Insert(ctx context.Context, req core.InsertRequest) error
- func (m *MQueue) Name() string
- func (m *MQueue) Next(ctx context.Context, req core.NextRequest) (uint64, error)
- func (m *MQueue) Remove(ctx context.Context, req core.RemoveRequest) error
- func (m *MQueue) Retrieve(ctx context.Context, req core.RetrieveRequest) (core.Elements, error)
- func (m *MQueue) Stats() stats.Metrics
- type Props
- type SingleInstanceProps
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsErrDeserialize ¶
func IsErrRedisExec ¶
func IsErrScriptLoad ¶
func IsErrSerialize ¶
Types ¶
type Client ¶
type Client interface { Eval(script string, keys []string, args ...interface{}) *redis.Cmd Exists(key ...string) *redis.IntCmd }
Client is the interface to the redis client used implementing the methods used by the MQueue implementation
type ClusterProps ¶
type ErrDeserialize ¶
type ErrDeserialize struct {
Cause error
}
func (ErrDeserialize) Error ¶
func (e ErrDeserialize) Error() string
type ErrRedisExec ¶
type ErrRedisExec struct {
Cause error
}
func (ErrRedisExec) Error ¶
func (e ErrRedisExec) Error() string
type ErrScriptLoad ¶
type ErrScriptLoad struct {
Cause error
}
func (ErrScriptLoad) Error ¶
func (e ErrScriptLoad) Error() string
type ErrSerialize ¶
type ErrSerialize struct {
Cause error
}
func (ErrSerialize) Error ¶
func (e ErrSerialize) Error() string
type MQueue ¶
type MQueue struct {
// contains filtered or unexported fields
}
MQueue implements the messaging queue functionality required from the mqueue package using Redis as a backend
func NewClusterMQueue ¶
func NewClusterMQueue(props ClusterProps) (*MQueue, error)
NewClusterMQueue creates a new instance of a redis client ready to be used against a redis cluster
func NewSingleMQueue ¶
func NewSingleMQueue(props SingleInstanceProps) (*MQueue, error)
NewSingleMQueue creates a new instance of a redis client ready to be used against a single instance of redis
type SingleInstanceProps ¶
Click to show internal directories.
Click to hide internal directories.