Documentation ¶
Index ¶
- type Adapter
- type AdapterQueue
- type ConsumerFunc
- type Memory
- func (m *Memory) Append(name string, message Message) error
- func (m *Memory) Connect() error
- func (m *Memory) Decrease(key string) error
- func (m *Memory) Del(key string) error
- func (m *Memory) Expire(key string, duration time.Duration) error
- func (m *Memory) Get(key string) (string, error)
- func (m *Memory) HashDel(hashKey, key string) error
- func (m *Memory) HashGet(hashKey, key string) (string, error)
- func (m *Memory) Increase(key string) error
- func (m *Memory) Register(name string, f ConsumerFunc)
- func (m *Memory) Run()
- func (m *Memory) Set(key string, value interface{}, expire int) error
- func (m *Memory) ShutDown()
- type MemoryMessage
- type Message
- type Redis
- func (r *Redis) Append(name string, message Message) error
- func (r *Redis) Connect() error
- func (r *Redis) Decrease(key string) error
- func (r *Redis) Del(key string) error
- func (r *Redis) Expire(key string, duration time.Duration) error
- func (r *Redis) Get(key string) (string, error)
- func (r *Redis) GetClient() *redis.Client
- func (r *Redis) HashDel(hashKey, key string) error
- func (r *Redis) HashGet(hashKey, key string) (string, error)
- func (r *Redis) HashMSet(hashKey string, value ...interface{}) error
- func (r *Redis) HashSet(hashKey string, value ...interface{}) error
- func (r *Redis) HashSetNX(hashKey, field string, value interface{}) error
- func (r *Redis) Increase(key string) error
- func (r *Redis) Lock(key string, ttl int64, option *redislock.Options) (*redislock.Lock, error)
- func (r *Redis) Register(name string, f ConsumerFunc)
- func (r *Redis) Run()
- func (r *Redis) Set(key string, value interface{}, expire int) error
- func (r *Redis) ShutDown()
- type RedisMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { Connect() error Get(key string) (string, error) Set(key string, value interface{}, expire int) error Del(key string) error HashGet(hashKey, key string) error HashSet(hashKey string, value ...interface{}) error HashSetNX(hashKey, field string, value interface{}) error HashMSet(hashKey string, value ...interface{}) error HashDel(hashKey, key string) error Increase(key string) error Decrease(key string) error Expire(key string, duration time.Duration) error AdapterQueue }
type AdapterQueue ¶
type AdapterQueue interface { Append(name string, message Message) error Register(name string, f ConsumerFunc) Run() ShutDown() }
type ConsumerFunc ¶
type Memory ¶
type Memory struct { PoolNum uint // contains filtered or unexported fields }
Memory struct
func (*Memory) Register ¶
func (m *Memory) Register(name string, f ConsumerFunc)
type MemoryMessage ¶
type MemoryMessage struct {
redisqueue.Message
}
func (*MemoryMessage) GetID ¶
func (m *MemoryMessage) GetID() string
func (*MemoryMessage) GetStream ¶
func (m *MemoryMessage) GetStream() string
func (*MemoryMessage) GetValues ¶
func (m *MemoryMessage) GetValues() map[string]interface{}
func (*MemoryMessage) SetID ¶
func (m *MemoryMessage) SetID(id string)
func (*MemoryMessage) SetStream ¶
func (m *MemoryMessage) SetStream(stream string)
func (*MemoryMessage) SetValues ¶
func (m *MemoryMessage) SetValues(value map[string]interface{})
type Redis ¶
type Redis struct { ConnectOption *redis.Options ConsumerOptions *redisqueue.ConsumerOptions ProducerOptions *redisqueue.ProducerOptions // contains filtered or unexported fields }
func (*Redis) Register ¶
func (r *Redis) Register(name string, f ConsumerFunc)
type RedisMessage ¶
type RedisMessage struct {
redisqueue.Message
}
func (*RedisMessage) GetID ¶
func (m *RedisMessage) GetID() string
func (*RedisMessage) GetStream ¶
func (m *RedisMessage) GetStream() string
func (*RedisMessage) GetValues ¶
func (m *RedisMessage) GetValues() map[string]interface{}
func (*RedisMessage) SetID ¶
func (m *RedisMessage) SetID(id string)
func (*RedisMessage) SetStream ¶
func (m *RedisMessage) SetStream(stream string)
func (*RedisMessage) SetValues ¶
func (m *RedisMessage) SetValues(value map[string]interface{})
Click to show internal directories.
Click to hide internal directories.