fetcher

package
v3.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

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(cache cache.Cache, cachel2 cache.Cache, cacheStubs bool, schema config.SchemaConfig, storage client.Client, l2CacheHandoff time.Duration) (*Fetcher, error)

New makes a new ChunkFetcher.

func (*Fetcher) Cache

func (c *Fetcher) Cache() cache.Cache

func (*Fetcher) Client

func (c *Fetcher) Client() client.Client

func (*Fetcher) FetchChunks

func (c *Fetcher) FetchChunks(ctx context.Context, chunks []chunk.Chunk) ([]chunk.Chunk, error)

FetchChunks fetches a set of chunks from cache and store. Note, returned chunks are not in the same order they are passed in

func (*Fetcher) IsChunkNotFoundErr

func (c *Fetcher) IsChunkNotFoundErr(err error) bool

func (*Fetcher) Stop

func (c *Fetcher) Stop()

Stop the ChunkFetcher.

func (*Fetcher) WriteBackCache

func (c *Fetcher) WriteBackCache(ctx context.Context, chunks []chunk.Chunk) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL