indexcache

package
v0.0.0-...-6842840 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyIndexedPack = errors.New("already indexed this pack index")
	ErrNotFound           = errors.New("ErrNotFound")
)
View Source
var (
	ErrTooManyPacksets = errors.New("ErrTooManyPacksets")
)

Functions

This section is empty.

Types

type Builder

type Builder interface {
	HasPackIndex(ctx context.Context, h arq.ShaHash) (bool, error)
	AddPackIndex(ctx context.Context, h arq.ShaHash, pi arq.ArqPackIndex) error
	Build(ctx context.Context) error
}

type FileBuilder

type FileBuilder struct {
	// contains filtered or unexported fields
}

func NewFileBuilder

func NewFileBuilder(workdir string) *FileBuilder

func (*FileBuilder) AddPackIndex

func (f *FileBuilder) AddPackIndex(ctx context.Context, h arq.ShaHash, pi arq.ArqPackIndex) error

func (*FileBuilder) Build

func (fb *FileBuilder) Build(ctx context.Context) error

func (*FileBuilder) HasPackIndex

func (f *FileBuilder) HasPackIndex(ctx context.Context, h arq.ShaHash) (bool, error)

type FileSearcher

type FileSearcher struct {
	// contains filtered or unexported fields
}

func NewFileSearcher

func NewFileSearcher(workdir string) *FileSearcher

func (*FileSearcher) Close

func (fs *FileSearcher) Close()

func (*FileSearcher) Find

func (*FileSearcher) Open

func (fs *FileSearcher) Open(ctx context.Context) error

type MapBackedCache

type MapBackedCache struct {
	// contains filtered or unexported fields
}

func NewMapBackedCache

func NewMapBackedCache() *MapBackedCache

func (*MapBackedCache) AddPackIndex

func (m *MapBackedCache) AddPackIndex(ctx context.Context, h arq.ShaHash, pi arq.ArqPackIndex) error

func (*MapBackedCache) Build

func (m *MapBackedCache) Build(ctx context.Context) error

func (*MapBackedCache) Find

func (*MapBackedCache) HasPackIndex

func (m *MapBackedCache) HasPackIndex(ctx context.Context, h arq.ShaHash) (bool, error)

type PackLocation

type PackLocation struct {
	Offset   uint64
	Length   uint64
	PackHash arq.ShaHash
}

type Searcher

type Searcher interface {
	Find(ctx context.Context, h arq.ShaHash) (PackLocation, error)
}

Jump to

Keyboard shortcuts

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