redis_cgi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisClient

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

func NewRedisClient

func NewRedisClient(url, auth string, ttl time.Duration, db int, l log.Logger) *RedisClient

func (*RedisClient) GetBlock

func (r *RedisClient) GetBlock(height int64) ([]byte, error)

func (*RedisClient) GetDeltas

func (r *RedisClient) GetDeltas(height int64) ([]byte, error, int64)

func (*RedisClient) GetLocker

func (r *RedisClient) GetLocker() bool

func (*RedisClient) ReleaseLocker

func (r *RedisClient) ReleaseLocker()

func (*RedisClient) ResetMostRecentHeightAfterUpload

func (r *RedisClient) ResetMostRecentHeightAfterUpload(targetHeight int64, upload func(int64) bool) (bool, int64, error)

return bool: if change the value of latest_height, need to upload

func (*RedisClient) SetBlock

func (r *RedisClient) SetBlock(height int64, bytes []byte) error

func (*RedisClient) SetDeltas

func (r *RedisClient) SetDeltas(height int64, bytes []byte) error

Jump to

Keyboard shortcuts

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