Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSectionReader ¶
func NewSectionReader(rd SectionReader, start, end int64) (*io.SectionReader, error)
Types ¶
type Discard ¶ added in v1.2.10
type Discard struct {
// contains filtered or unexported fields
}
type SectionWriter ¶
type SectionWriter struct {
// contains filtered or unexported fields
}
func NewSectionWriter ¶
func NewSectionWriter(wr io.WriteSeeker, start, end int64) (*SectionWriter, error)
type Segment ¶
type Segment[V enumGet, U enumSet[V]] struct {
// contains filtered or unexported fields
}
Segment is a segment of a file.
func (*Segment[V, U]) Open ¶
func (s *Segment[V, U]) Open() (SectionReader, error)
Open opens the segment for reading.
type SegmentWriter ¶
type SegmentWriter[V enumGet, U enumSet[V]] struct {
// contains filtered or unexported fields
}
A SegmentWriter writes a section of a segmented file.
func (*SegmentWriter[V, U]) Close ¶
func (w *SegmentWriter[V, U]) Close() error
Close closes the segment and finalizes its header.
func (*SegmentWriter[V, U]) Seek ¶
func (w *SegmentWriter[V, U]) Seek(offset int64, whence int) (int64, error)
Seek seeks to an offset.
func (*SegmentWriter[V, U]) Type ¶
func (s *SegmentWriter[V, U]) Type() V
Type returns the segment's type.
type SegmentedReader ¶
type SegmentedReader[V enumGet, U enumSet[V]] struct {
// contains filtered or unexported fields
}
SegmentedReader reads a segmented file.
func NewSegmentedReader ¶
func NewSegmentedReader[V enumGet, U enumSet[V]](file SectionReader) *SegmentedReader[V, U]
NewSegmentedReader returns a new segmented reader for the file.
func (*SegmentedReader[V, U]) Next ¶
func (r *SegmentedReader[V, U]) Next() (*Segment[V, U], error)
Next finds the segment.
type SegmentedWriter ¶
type SegmentedWriter[V enumGet, U enumSet[V]] struct {
// contains filtered or unexported fields
}
SegmentedWriter writes a segmented file.
func NewSegmentedWriter ¶
func NewSegmentedWriter[V enumGet, U enumSet[V]](w io.WriteSeeker) *SegmentedWriter[V, U]
NewSegmentedWriter returns a new segmented writer.
func (*SegmentedWriter[V, U]) Open ¶
func (w *SegmentedWriter[V, U]) Open(typ V) (*SegmentWriter[V, U], error)
Open opens a segment.
Click to show internal directories.
Click to hide internal directories.