cache

package
v0.1.0-rc.2-kravitz Latest Latest
Warning

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

Go to latest
Published: Dec 30, 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) 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) 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