blocks_cache

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BtcCacheElement

type BtcCacheElement struct {
	BlockResult *btcclient.BlockResult
	TimeAdded   time.Time
}

type CacheHandler

type CacheHandler struct {
	CountBlocksPerRequest int
	// contains filtered or unexported fields
}

func New

func New() (handler *CacheHandler)

func (*CacheHandler) AddBtcBlock

func (h *CacheHandler) AddBtcBlock(serialId int64, blockResult *btcclient.BlockResult)

func (*CacheHandler) AddJaxBlock

func (h *CacheHandler) AddJaxBlock(serialId int64, blockResult *jaxclient.BlockResult)

func (*CacheHandler) DeleteOutdatedCache

func (h *CacheHandler) DeleteOutdatedCache()

func (*CacheHandler) GetBtcBlock

func (h *CacheHandler) GetBtcBlock(serialId int64) (blockResult *btcclient.BlockResult, err error)

func (*CacheHandler) GetJaxBlock

func (h *CacheHandler) GetJaxBlock(serialId int64) (blockResult *jaxclient.BlockResult, err error)

type JaxCacheElement

type JaxCacheElement struct {
	BlockResult *jaxclient.BlockResult
	TimeAdded   time.Time
}

Jump to

Keyboard shortcuts

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