backends

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: GPL-3.0 Imports: 4 Imported by: 3

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
	Clone() BackendInterface
}

type LocalBackend

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

func NewLocalBackend

func NewLocalBackend() LocalBackend

func (*LocalBackend) Activate

func (l *LocalBackend) Activate()

func (*LocalBackend) Clone

func (l *LocalBackend) Clone() BackendInterface

func (LocalBackend) GetPoolSize

func (l LocalBackend) GetPoolSize() int

func (*LocalBackend) GetResult

func (l *LocalBackend) GetResult(key string) (message.Result, error)

func (*LocalBackend) SetPoolSize

func (l *LocalBackend) SetPoolSize(i int)

func (*LocalBackend) SetResult

func (l *LocalBackend) 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