Documentation ¶
Index ¶
- type PanHeaderCache
- func (c *PanHeaderCache) Get(ctx context.Context, slot uint64) (*eth1Types.Header, error)
- func (c *PanHeaderCache) GetAll() ([]*eth1Types.Header, error)
- func (c *PanHeaderCache) Purge()
- func (c *PanHeaderCache) Put(ctx context.Context, slot uint64, header *eth1Types.Header) error
- func (c *PanHeaderCache) Remove(ctx context.Context, slot uint64)
- type PandoraHeaderCache
- type VanShardingInfoCache
- func (vc *VanShardingInfoCache) Get(ctx context.Context, slot uint64) (*types.VanguardShardInfo, error)
- func (c *VanShardingInfoCache) Purge()
- func (vc *VanShardingInfoCache) Put(ctx context.Context, slot uint64, shardInfo *types.VanguardShardInfo) error
- func (vc *VanShardingInfoCache) Remove(ctx context.Context, slot uint64)
- type VanguardShardCache
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.
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 ¶
func (vc *VanShardingInfoCache) Get(ctx context.Context, slot uint64) (*types.VanguardShardInfo, error)
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.
type VanguardShardCache ¶
type VanguardShardCache = iface.VanguardShardInfoCache
VanguardShardCache vanguard sharding info chache
Click to show internal directories.
Click to hide internal directories.