Documentation
¶
Index ¶
Constants ¶
View Source
const ( MaxCachedReaders = 512 PieceReaderCacheTTL = 10 * time.Minute PieceErrorCacheTTL = 5 * time.Second )
Variables ¶
View Source
var CachedReaderMeasures = struct { CacheHits *stats.Int64Measure CacheMisses *stats.Int64Measure CacheEvictions *stats.Int64Measure CacheSize *stats.Int64Measure CacheRefs *stats.Int64Measure ReaderErrors *stats.Int64Measure ReaderSuccesses *stats.Int64Measure }{ CacheHits: stats.Int64(pre+"cache_hits", "Number of cache hits.", stats.UnitDimensionless), CacheMisses: stats.Int64(pre+"cache_misses", "Number of cache misses.", stats.UnitDimensionless), CacheEvictions: stats.Int64(pre+"cache_evictions", "Number of cache evictions.", stats.UnitDimensionless), CacheSize: stats.Int64(pre+"cache_size", "Current number of entries in cache.", stats.UnitDimensionless), CacheRefs: stats.Int64(pre+"cache_refs", "Number of active references to cached readers.", stats.UnitDimensionless), ReaderErrors: stats.Int64(pre+"reader_errors", "Total number of piece reader errors.", stats.UnitDimensionless), ReaderSuccesses: stats.Int64(pre+"reader_successes", "Total number of successful piece reader creations.", stats.UnitDimensionless), }
CachedReaderMeasures groups all cached reader metrics.
View Source
var ErrNoDeal = errors.New("no deals found")
Functions ¶
This section is empty.
Types ¶
type CachedPieceReader ¶
type CachedPieceReader struct {
// contains filtered or unexported fields
}
func NewCachedPieceReader ¶
func NewCachedPieceReader(db *harmonydb.DB, sectorReader *pieceprovider.SectorReader, pieceParkReader *pieceprovider.PieceParkReader, idxStor *indexstore.IndexStore) *CachedPieceReader
type PrefetchReader ¶
type PrefetchReader struct {
// contains filtered or unexported fields
}
func (*PrefetchReader) Close ¶
func (pr *PrefetchReader) Close() error
type SubPieceReader ¶ added in v1.27.2
type SubPieceReader struct {
// contains filtered or unexported fields
}
func (SubPieceReader) Close ¶ added in v1.27.2
func (s SubPieceReader) Close() error
func (SubPieceReader) Read ¶ added in v1.27.2
func (s SubPieceReader) Read(p []byte) (n int, err error)
Click to show internal directories.
Click to hide internal directories.