mrredis

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

func New

func New() *Connection

func (*Connection) Cli

func (c *Connection) Cli() redis.UniversalClient

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) Connect

func (c *Connection) Connect(opt Options) error

func (*Connection) Delete

func (c *Connection) Delete(ctx context.Context, key ...string) error

func (*Connection) GetStruct

func (c *Connection) GetStruct(ctx context.Context, key string, data any) error

func (*Connection) NewMutex

func (c *Connection) NewMutex(name string, options ...redsync.Option) *redsync.Mutex

func (*Connection) Ping added in v0.1.0

func (c *Connection) Ping(ctx context.Context) error

func (*Connection) SetStruct

func (c *Connection) SetStruct(ctx context.Context, key string, data any, expiration time.Duration) error

type Options

type Options struct {
	Host        string
	Port        string
	Password    string
	ConnTimeout time.Duration
}

Jump to

Keyboard shortcuts

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