Documentation ¶
Index ¶
- type LRUCache
- func (c *LRUCache) Add(key *externalapi.DomainOutpoint, value externalapi.UTXOEntry)
- func (c *LRUCache) Clear()
- func (c *LRUCache) Get(key *externalapi.DomainOutpoint) (externalapi.UTXOEntry, bool)
- func (c *LRUCache) Has(key *externalapi.DomainOutpoint) bool
- func (c *LRUCache) Remove(key *externalapi.DomainOutpoint)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LRUCache ¶
type LRUCache struct {
// contains filtered or unexported fields
}
LRUCache is a least-recently-used cache for UTXO entries indexed by DomainOutpoint
func (*LRUCache) Add ¶
func (c *LRUCache) Add(key *externalapi.DomainOutpoint, value externalapi.UTXOEntry)
Add adds an entry to the LRUCache
func (*LRUCache) Get ¶
func (c *LRUCache) Get(key *externalapi.DomainOutpoint) (externalapi.UTXOEntry, bool)
Get returns the entry for the given key, or (nil, false) otherwise
func (*LRUCache) Has ¶
func (c *LRUCache) Has(key *externalapi.DomainOutpoint) bool
Has returns whether the LRUCache contains the given key
func (*LRUCache) Remove ¶
func (c *LRUCache) Remove(key *externalapi.DomainOutpoint)
Remove removes the entry for the the given key. Does nothing if the entry does not exist
Click to show internal directories.
Click to hide internal directories.