Documentation
¶
Index ¶
- Constants
- func HideKey(key string) string
- type ClientOption
- type MemCacheClient
- type MongoClient
- type RabbitMqClient
- type RedisClient
- func (c *RedisClient) BLPop(key string, timeout time.Duration) *redis.StringSliceCmd
- func (c *RedisClient) Close()
- func (c *RedisClient) Do(args ...interface{}) *redis.Cmd
- func (c *RedisClient) Exists(key string) (bool, error)
- func (c *RedisClient) Flush() error
- func (c *RedisClient) Get(key string) *redis.StringCmd
- func (c *RedisClient) LPush(key string, value interface{}) error
- func (c *RedisClient) Ping() error
- func (c *RedisClient) RPush(key string, value interface{}) error
- func (c *RedisClient) Set(key string, value interface{}, exTime time.Duration) error
- type Result
- type RocketMqClient
Constants ¶
View Source
const AMQPNil = amqpErr("amqp: nil")
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientOption ¶ added in v2.3.1
type ClientOption func(options *clientOptions)
func WithAutoCreateTopic ¶ added in v2.3.1
func WithAutoCreateTopic(auto bool) ClientOption
func WithBrokerAddr ¶ added in v2.3.1
func WithBrokerAddr(addr []string) ClientOption
func WithNameSrvAddr ¶ added in v2.3.1
func WithNameSrvAddr(addr []string) ClientOption
type MemCacheClient ¶ added in v2.1.4
type MemCacheClient struct {
// contains filtered or unexported fields
}
func NewMemCacheClient ¶ added in v2.1.4
func NewMemCacheClient(host, port string, poolSize int) MemCacheClient
func (*MemCacheClient) Close ¶ added in v2.1.4
func (c *MemCacheClient) Close()
func (*MemCacheClient) Flush ¶ added in v2.1.4
func (c *MemCacheClient) Flush() error
func (*MemCacheClient) Get ¶ added in v2.1.4
func (c *MemCacheClient) Get(key string) (string, error)
======================= high api =======================
func (*MemCacheClient) Ping ¶ added in v2.1.4
func (c *MemCacheClient) Ping() error
type MongoClient ¶ added in v2.1.4
type MongoClient struct {
// contains filtered or unexported fields
}
func NewMongoClient ¶ added in v2.1.4
func NewMongoClient(host, port, user, password, db, collection string) MongoClient
func (*MongoClient) Close ¶ added in v2.1.4
func (c *MongoClient) Close()
func (*MongoClient) Get ¶ added in v2.1.4
func (c *MongoClient) Get(key string) (string, error)
======================= high api =======================
func (*MongoClient) Ping ¶ added in v2.1.4
func (c *MongoClient) Ping() error
type RabbitMqClient ¶ added in v2.1.4
type RabbitMqClient struct {
// contains filtered or unexported fields
}
func NewRabbitMqClient ¶ added in v2.1.4
func NewRabbitMqClient(host, port, user, password, vhost string) RabbitMqClient
func (*RabbitMqClient) Close ¶ added in v2.1.4
func (c *RabbitMqClient) Close()
func (*RabbitMqClient) Get ¶ added in v2.1.4
func (c *RabbitMqClient) Get(queueName string) (string, error)
func (*RabbitMqClient) Ping ¶ added in v2.1.4
func (c *RabbitMqClient) Ping() error
type RedisClient ¶
type RedisClient struct {
// contains filtered or unexported fields
}
func NewRedisClient ¶
func (*RedisClient) BLPop ¶
func (c *RedisClient) BLPop(key string, timeout time.Duration) *redis.StringSliceCmd
func (*RedisClient) Close ¶
func (c *RedisClient) Close()
func (*RedisClient) Do ¶
func (c *RedisClient) Do(args ...interface{}) *redis.Cmd
func (*RedisClient) Exists ¶
func (c *RedisClient) Exists(key string) (bool, error)
======================= high api =======================
func (*RedisClient) Flush ¶
func (c *RedisClient) Flush() error
func (*RedisClient) Get ¶
func (c *RedisClient) Get(key string) *redis.StringCmd
func (*RedisClient) LPush ¶ added in v2.2.0
func (c *RedisClient) LPush(key string, value interface{}) error
func (*RedisClient) Ping ¶
func (c *RedisClient) Ping() error
func (*RedisClient) RPush ¶
func (c *RedisClient) RPush(key string, value interface{}) error
type RocketMqClient ¶ added in v2.3.0
type RocketMqClient struct { Producer rocketmq.Producer ConsumerMap map[string]rocketmq.PushConsumer MsgChanMap map[string]chan string Admin admin.Admin // contains filtered or unexported fields }
func NewRocketMqClient ¶ added in v2.3.0
func NewRocketMqClient(opts ...ClientOption) RocketMqClient
func (*RocketMqClient) Publish ¶ added in v2.3.0
func (c *RocketMqClient) Publish(topic string, value interface{}, Priority uint8) error
func (*RocketMqClient) Register ¶ added in v2.3.0
func (c *RocketMqClient) Register(topic string) (<-chan string, error)
func (*RocketMqClient) TopicDeleter ¶ added in v2.3.1
func (c *RocketMqClient) TopicDeleter(topic string)
Click to show internal directories.
Click to hide internal directories.