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, dur time.Duration) error
- func (m *Memory) Get(key string) (string, error)
- func (m *Memory) HashDel(hk, key string) error
- func (m *Memory) HashGet(hk, 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, val 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, dur time.Duration) error
- func (r *Redis) Get(key string) (string, error)
- func (r *Redis) GetClient() *redis.Client
- func (r *Redis) HashDel(hk, key string) error
- func (r *Redis) HashGet(hk, key string) (string, error)
- func (r *Redis) Increase(key string) error
- func (r *Redis) Lock(key string, ttl int64, options *redislock.Options) (*redislock.Lock, error)
- func (r *Redis) Register(name string, f ConsumerFunc)
- func (r *Redis) Run()
- func (r *Redis) Set(key string, val 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, val interface{}, expire int) error Del(key string) error HashGet(hk, key string) (string, error) HashDel(hk, key string) error Increase(key string) error Decrease(key string) error Expire(key string, dur 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 }
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(values map[string]interface{})
type Redis ¶
type Redis struct { ConnectOption *redis.Options ConsumerOptions *redisqueue.ConsumerOptions ProducerOptions *redisqueue.ProducerOptions // contains filtered or unexported fields }
Redis cache implement
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(values map[string]interface{})
Click to show internal directories.
Click to hide internal directories.