Documentation ¶
Index ¶
- type FileSet
- type Option
- type Reader
- type Storage
- func (s *Storage) New(ctx context.Context, name string, opts ...Option) *FileSet
- func (s *Storage) NewIndexReader(ctx context.Context, fileSet, idxPrefix string) *index.Reader
- func (s *Storage) NewIndexWriter(ctx context.Context, fileSet string) *index.Writer
- func (s *Storage) NewReader(ctx context.Context, fileSet, idxPrefix string) *Reader
- func (s *Storage) NewWriter(ctx context.Context, fileSet string) *Writer
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileSet ¶ added in v1.9.6
type FileSet struct {
// contains filtered or unexported fields
}
FileSet is a set of files. This may be a full filesystem or a subfilesystem (e.g. datum / datum set / shard).
func (*FileSet) Delete ¶ added in v1.9.6
Delete deletes a file from the file set. (bryce) might need to delete ancestor directories in certain cases.
type Option ¶ added in v1.9.6
type Option func(f *FileSet)
Option configures a file set.
func WithMemThreshold ¶ added in v1.9.6
WithMemThreshold sets the memory threshold of the file set.
func WithParent ¶ added in v1.9.6
WithParent sets the parent of the file set.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader reads the serialized format of a fileset.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is the abstraction that manages fileset storage.
func NewStorage ¶
NewStorage creates a new Storage.
func (*Storage) NewIndexReader ¶
NewIndexReader creates a new index.Reader.
func (*Storage) NewIndexWriter ¶
NewIndexWriter creates a new index.Writer.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer writes the serialized format of a fileset. The serialized format of a fileset consists of indexes and content which are both realized as compressed tar stream chunks.
func (*Writer) Close ¶
Close closes the writer. (bryce) is not closing the tar writer the right choice here? We cannot include it in the last file's range because it will effect the hash. Our indexing is what will exit the reading of the tar stream, not the end of tar entry (two empty 512 bytes).
func (*Writer) CopyFiles ¶ added in v1.9.5
CopyFiles does a cheap copy of files from a reader to a writer. (bryce) need to handle delete operations.
func (*Writer) CopyTags ¶ added in v1.9.5
CopyTags does a cheap copy of tagged file data from a reader to a writer.
func (*Writer) StartTag ¶
StartTag starts a tag for the next set of bytes (used for the reverse index, mapping file output to datums).