backends

package
v2.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendInterface

type BackendInterface interface {
	SetResult(result message.Result, exTime int) error
	GetResult(key string) (message.Result, error)
	// 调用Activate后才真正建立连接
	Activate()
	SetPoolSize(int)
	GetPoolSize() int
}

type RedisBackend

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

func NewRedisBackend

func NewRedisBackend(host string, port string, password string, db int, poolSize int) RedisBackend

func (*RedisBackend) Activate

func (r *RedisBackend) Activate()

func (*RedisBackend) GetPoolSize

func (r *RedisBackend) GetPoolSize() int

func (*RedisBackend) GetResult

func (r *RedisBackend) GetResult(key string) (message.Result, error)

func (*RedisBackend) SetPoolSize

func (r *RedisBackend) SetPoolSize(n int)

func (*RedisBackend) SetResult

func (r *RedisBackend) SetResult(result message.Result, exTime int) error

Jump to

Keyboard shortcuts

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