Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrConn = errors.New("cannot connect to address") ErrShutdown = errors.New("cannot shutdown redisCluster client") ErrZSetEntryAdd = errors.New("cannot add entry to zset") ErrZSetEntryDelete = errors.New("cannot delete entry from zset") ErrStreamNotExist = errors.New("ERR no such key") ErrConsumerGroupExist = errors.New("BUSYGROUP Consumer Group name already exists") )
Functions ¶
This section is empty.
Types ¶
type CmdableExtension ¶
CmdableExtension interface extension to pass to various Redis extensions in this package
type Config ¶
type KVStore ¶
type KVStore interface { Set(ctx context.Context, key string, value interface{}, expiry time.Duration) error Get(ctx context.Context, key string) (string, error) Delete(ctx context.Context, key string) error }
func NewKVStore ¶
NewKVStore creates a new instance of kvStore.
type SortedSet ¶
type SortedSet interface { C() <-chan Entry Start(ctx context.Context, interval time.Duration) Stop() AddEntry(ctx context.Context, entry Entry) error DeleteEntry(ctx context.Context, entryID string) error GetEntries(ctx context.Context, min, max string) ([]Entry, error) }
func NewZSortedSet ¶
NewZSortedSet start a new ZSet internal ticker with a name and a ticker in seconds
type StreamMessageHandler ¶
type StreamMessageHandler interface {
HandleMessage(ctx context.Context, req StreamMessageReq) StreamMessageRes
}
type StreamMessageReq ¶
func (*StreamMessageReq) Decode ¶
func (msg *StreamMessageReq) Decode(v interface{}) error
type StreamMessageRes ¶
type Streamer ¶
type Streamer interface { CreateStream(ctx context.Context, streamName, groupName string) error CleanupStream(ctx context.Context, streamName string, retentionPeriod time.Duration) Publish(ctx context.Context, streamName string, message map[string]interface{}) error Subscribe(ctx context.Context, streamName, groupName, consumerName string, handler StreamMessageHandler) error }
func NewStreamer ¶
NewStreamer create a new streamer instance
Click to show internal directories.
Click to hide internal directories.