redis

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*redis.Client
}

func NewClient

func NewClient(cfg structure.RedisConfiguration) (*Client, error)

func (*Client) UseDb

func (c *Client) UseDb(dbIndex DB, f func(p redis.Pipeliner) error) ([]redis.Cmder, error)

func (*Client) UseDbTx

func (c *Client) UseDbTx(dbIndex DB, f func(p redis.Pipeliner) error) ([]redis.Cmder, error)

type DB

type DB int
const (
	ApplicationTokenDb DB = iota
	ApplicationPermissionDb
	UserTokenDb
	UserPermissionDb
	DeviceTokenDb
	DevicePermissionDb
)

type Option

type Option func(client *RxClient)

func WithInitHandler

func WithInitHandler(handler initHandler) Option

type RxClient

type RxClient struct {
	*Client
	// contains filtered or unexported fields
}

func NewRxClient

func NewRxClient(opts ...Option) *RxClient

func (*RxClient) Close

func (rc *RxClient) Close() error

func (*RxClient) ReceiveConfiguration

func (rc *RxClient) ReceiveConfiguration(cfg structure.RedisConfiguration)

Jump to

Keyboard shortcuts

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