cache

package
v0.0.0-...-e66b27f Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNoInitialization = errors.New("not initialization")
)

Functions

This section is empty.

Types

type RedisCache

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

func NewRedisCache

func NewRedisCache() *RedisCache

func (*RedisCache) ClearShareHistory

func (c *RedisCache) ClearShareHistory(key service.ShareKey) error

func (*RedisCache) DelRegisterContext

func (c *RedisCache) DelRegisterContext(key service.RegisterKey) error

func (*RedisCache) ExistShareHash

func (c *RedisCache) ExistShareHash(key service.ShareKey, hash string) (bool, error)

func (*RedisCache) GetBlockTransactions

func (c *RedisCache) GetBlockTransactions(key service.JobKey) ([]*service.Transaction, error)

func (*RedisCache) GetRegisterContext

func (c *RedisCache) GetRegisterContext(key service.RegisterKey) (*service.Register, error)

func (*RedisCache) SetBlockTransactions

func (c *RedisCache) SetBlockTransactions(key service.JobKey, expireTs int, transactions []*service.Transaction) error

func (*RedisCache) SetClient

func (c *RedisCache) SetClient(client *redis.Pool) *RedisCache

func (*RedisCache) SetRegisterContext

func (c *RedisCache) SetRegisterContext(key service.RegisterKey, r *service.Register) error

func (*RedisCache) SetShareHash

func (c *RedisCache) SetShareHash(key service.ShareKey, hash string) error

Jump to

Keyboard shortcuts

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