cache

package
v0.0.0-...-4582ed7 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: GPL-3.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 PairCache

type PairCache interface {
	Set(context.Context, string, *models.Pair) error
	Get(context.Context, string) (*models.Pair, error)
}

func NewPairsCache

func NewPairsCache(redis *redis.Client) PairCache

type RedisPairsCache

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

func (*RedisPairsCache) Get

func (p *RedisPairsCache) Get(ctx context.Context, address string) (*models.Pair, error)

func (*RedisPairsCache) Key

func (p *RedisPairsCache) Key(address string) string

func (*RedisPairsCache) Set

func (p *RedisPairsCache) Set(ctx context.Context, address string, pair *models.Pair) error

Jump to

Keyboard shortcuts

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