Documentation ¶
Index ¶
- type Fetcher
- func (c *Fetcher) Cache() cache.Cache
- func (c *Fetcher) Client() client.Client
- func (c *Fetcher) FetchChunks(ctx context.Context, chunks []chunk.Chunk, keys []string) ([]chunk.Chunk, error)
- func (c *Fetcher) IsChunkNotFoundErr(err error) bool
- func (c *Fetcher) Stop()
- func (c *Fetcher) WriteBackCache(ctx context.Context, chunks []chunk.Chunk) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher deals with fetching chunk contents from the cache/store, and writing back any misses to the cache. Also responsible for decoding chunks from the cache, in parallel.
func New ¶
func New(cacher cache.Cache, cacheStubs bool, schema config.SchemaConfig, storage client.Client, maxAsyncConcurrency int, maxAsyncBufferSize int) (*Fetcher, error)
New makes a new ChunkFetcher.
func (*Fetcher) FetchChunks ¶
func (c *Fetcher) FetchChunks(ctx context.Context, chunks []chunk.Chunk, keys []string) ([]chunk.Chunk, error)
FetchChunks fetches a set of chunks from cache and store. Note that the keys passed in must be lexicographically sorted, while the returned chunks are not in the same order as the passed in chunks.
func (*Fetcher) IsChunkNotFoundErr ¶
Click to show internal directories.
Click to hide internal directories.