cache

package
v0.0.25-debug-fork3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: 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 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) 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