redsid

package
v0.2.56 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	// 名字前缀
	// 默认: redsID
	NamePrefix string

	// 过期时间
	// 默认: 5s
	ExpiredTime time.Duration

	// 重试时间
	// 默认: 2s
	RetryTime time.Duration
	// contains filtered or unexported fields
}

func New

func New() *Cfg

func (*Cfg) GetID

func (t *Cfg) GetID() int

func (*Cfg) Start

func (t *Cfg) Start()

func (*Cfg) Stop

func (t *Cfg) Stop()

type IRedis

type IRedis interface {
	SetNX(key string, value interface{}, expiration time.Duration) *redis.BoolCmd
}

Jump to

Keyboard shortcuts

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