driver

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseMQ

func CloseMQ(conn *amqp.Connection, channel *amqp.Channel)

func ConnectMQ

func ConnectMQ(config *configs.Configs, opName string) (*amqp.Connection, *amqp.Channel)

func Logger

func Logger(config *configs.Configs) *logrus.Logger

Types

type RabbitMQ

type RabbitMQ struct {
	Body      string
	QueueName string
}

func (*RabbitMQ) Consume

func (r *RabbitMQ) Consume()

func (*RabbitMQ) Publish

func (r *RabbitMQ) Publish()

type RedisClient

type RedisClient interface {
	HGet(key, field string) ([]byte, error)
	HSet(key, field string, value interface{}, expDur time.Duration) error
	HDel(key, field string) error
	Del(key string) error
	Set(key string, value interface{}, expDur time.Duration) error
	Get(key string) (string, error)
	SetNX(key string, value string, duration time.Duration) (bool, error)
	Keys(key string) ([]string, error)
}

func NewRedis

func NewRedis(redisClient redis.Cmdable) RedisClient

func Redis

func Redis(config *configs.Configs) RedisClient

Jump to

Keyboard shortcuts

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