drive

package
v2.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2021 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const AMQPNil = amqpErr("amqp: nil")

Variables

This section is empty.

Functions

func HideKey

func HideKey(key string) string

Types

type ClientOption

type ClientOption func(options *clientOptions)

func WithAutoCreateTopic

func WithAutoCreateTopic(auto bool) ClientOption

func WithBrokerAddr

func WithBrokerAddr(addr []string) ClientOption

func WithNameSrvAddr

func WithNameSrvAddr(addr []string) ClientOption

type MemCacheClient

type MemCacheClient struct {
	// contains filtered or unexported fields
}

func NewMemCacheClient

func NewMemCacheClient(host, port string, poolSize int) MemCacheClient

func (*MemCacheClient) Close

func (c *MemCacheClient) Close()

func (*MemCacheClient) Flush

func (c *MemCacheClient) Flush() error

func (*MemCacheClient) Get

func (c *MemCacheClient) Get(key string) (string, error)

======================= high api =======================

func (*MemCacheClient) Ping

func (c *MemCacheClient) Ping() error

func (*MemCacheClient) Set

func (c *MemCacheClient) Set(key string, value interface{}, exTime int) error

type MongoClient

type MongoClient struct {
	// contains filtered or unexported fields
}

func NewMongoClient

func NewMongoClient(host, port, user, password, db, collection string) MongoClient

func (*MongoClient) Close

func (c *MongoClient) Close()

func (*MongoClient) Get

func (c *MongoClient) Get(key string) (string, error)

======================= high api =======================

func (*MongoClient) Ping

func (c *MongoClient) Ping() error

func (*MongoClient) Set

func (c *MongoClient) Set(key string, value interface{}, exTime int) error

type RabbitMqClient

type RabbitMqClient struct {
	// contains filtered or unexported fields
}

func NewRabbitMqClient

func NewRabbitMqClient(host, port, user, password, vhost string) RabbitMqClient

func (*RabbitMqClient) Close

func (c *RabbitMqClient) Close()

func (*RabbitMqClient) Get

func (c *RabbitMqClient) Get(queueName string) (string, error)

func (*RabbitMqClient) Ping

func (c *RabbitMqClient) Ping() error

func (*RabbitMqClient) Publish

func (c *RabbitMqClient) Publish(queueName string, value interface{}, Priority uint8) error

type RedisClient

type RedisClient struct {
	// contains filtered or unexported fields
}

func NewRedisClient

func NewRedisClient(host string, port string, password string, db int, poolSize int) RedisClient

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

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

func (*RedisClient) Set

func (c *RedisClient) Set(key string, value interface{}, exTime time.Duration) error

type Result

type Result struct {
	Uuid       string    `json:"uuid" bson:"uuid"`
	Res        string    `json:"res" bson:"res"`
	CreateTime time.Time `json:"create_time" bson:"create_time"`
}

type RocketMqClient

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

func NewRocketMqClient(opts ...ClientOption) RocketMqClient

func (*RocketMqClient) Publish

func (c *RocketMqClient) Publish(topic string, value interface{}, Priority uint8) error

func (*RocketMqClient) Register

func (c *RocketMqClient) Register(topic string) (<-chan string, error)

func (*RocketMqClient) TopicDeleter

func (c *RocketMqClient) TopicDeleter(topic string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL