cache

package
v0.6.0-develop Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PanHeaderCache

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

PanHeaderCache

func NewPanHeaderCache

func NewPanHeaderCache() *PanHeaderCache

NewPanHeaderCache initializes the map and underlying cache.

func (*PanHeaderCache) Get

func (c *PanHeaderCache) Get(ctx context.Context, slot uint64) (*eth1Types.Header, error)

Get

func (*PanHeaderCache) GetAll

func (c *PanHeaderCache) GetAll() ([]*eth1Types.Header, error)

func (*PanHeaderCache) Purge

func (c *PanHeaderCache) Purge()

Clear the pandora header cache.

func (*PanHeaderCache) Put

func (c *PanHeaderCache) Put(ctx context.Context, slot uint64, header *eth1Types.Header) error

Put

func (*PanHeaderCache) Remove

func (c *PanHeaderCache) Remove(ctx context.Context, slot uint64)

type PandoraHeaderCache

type PandoraHeaderCache = iface.PandoraHeaderCache

type VanShardingInfoCache

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

VanShardingInfoCache common struct for storing sharding info in a LRU cache

func NewVanShardInfoCache

func NewVanShardInfoCache(cacheSize int) *VanShardingInfoCache

NewVanShardInfoCache initializes the map and underlying cache.

func (*VanShardingInfoCache) Get

Get retrieves sharding info from a cache. returns error if fails

func (*VanShardingInfoCache) Purge

func (c *VanShardingInfoCache) Purge()

Clear the vanguard sharding cache.

func (*VanShardingInfoCache) Put

func (vc *VanShardingInfoCache) Put(ctx context.Context, slot uint64, shardInfo *types.VanguardShardInfo) error

Put puts sharding info into a lru cache. return error if fails.

func (*VanShardingInfoCache) Remove

func (vc *VanShardingInfoCache) Remove(ctx context.Context, slot uint64)

type VanguardShardCache

type VanguardShardCache = iface.VanguardShardInfoCache

VanguardShardCache vanguard sharding info chache

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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