Documentation ¶
Index ¶
- type Cache
- func (r *Cache) GetCidToOffsetAndSize(c cid.Cid) (*indexes.OffsetAndSize, error, bool)
- func (r *Cache) GetRawCarObject(c cid.Cid) (v []byte, err error, has bool)
- func (r *Cache) GetSlotToCid(slot uint64) (cid.Cid, error, bool)
- func (r *Cache) PutCidToOffsetAndSize(c cid.Cid, oas *indexes.OffsetAndSize) error
- func (r *Cache) PutRawCarObject(c cid.Cid, data []byte) error
- func (r *Cache) PutSlotToCid(slot uint64, c cid.Cid) error
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
}
func NewWithConfig ¶
func (*Cache) GetCidToOffsetAndSize ¶
func (r *Cache) GetCidToOffsetAndSize(c cid.Cid) (*indexes.OffsetAndSize, error, bool)
func (*Cache) GetRawCarObject ¶
GetRawCarObject returns the raw CAR object data from the cache if it exists.
func (*Cache) GetSlotToCid ¶
GetSlotToCid returns the CID for the given slot if it exists in the cache.
func (*Cache) PutCidToOffsetAndSize ¶
func (r *Cache) PutCidToOffsetAndSize(c cid.Cid, oas *indexes.OffsetAndSize) error
func (*Cache) PutRawCarObject ¶
PutRawCarObject stores the raw CAR object data.
func (*Cache) PutSlotToCid ¶
PutSlotToCid stores the CID for the given slot.
Click to show internal directories.
Click to hide internal directories.