Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a thread-safe store for chain configs. Data can only be changed via UpdateChains.
func (*Cache) GetAllChains ¶
GetAllChains returns a slice copy of all chain data.
func (*Cache) GetChainData ¶
GetChainData returns a pointer copy of a chain's data, safe for reading. If not found, returns nil.
func (*Cache) LastUpdated ¶
LastUpdated returns the last time the cache was refreshed.
func (*Cache) UpdateChains ¶
func (c *Cache) UpdateChains(chains []*uregistrytypes.ChainConfig)
UpdateChains atomically replaces the entire cache.
type ChainData ¶
type ChainData struct {
Config *uregistrytypes.ChainConfig
UpdatedAt time.Time
}
ChainData holds a chain config and when it was last updated.
Click to show internal directories.
Click to hide internal directories.