Documentation
¶
Overview ¶
Package storage contains the storage mechanism of segments and parts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
Factory allows to allocate the storage behind init files, segments and parts.
func NewFactoryDisk ¶
NewFactoryDisk allocates a disk-backed factory.
type File ¶ added in v0.2.0
type File interface {
// Finalize finalizes the file, making it read-only.
// It must always be called to avoid a memory leak.
Finalize()
// Remove removes the file from disk.
Remove()
// NewPart allocates a file part.
NewPart() Part
// Reader returns a ReadCloser to read the file.
// Close() must always be called to avoid a memory leak.
Reader() (io.ReadCloser, error)
// Size returns the size of the file.
Size() uint64
}
File is the underlying storage of a file.
type Part ¶
type Part interface {
// Writer returns a Writer to write the part.
Writer() io.WriteSeeker
// Reader returns a ReadCloser to read the part.
// Close() must always be called to avoid a memory leak.
Reader() (io.ReadCloser, error)
}
Part is the underlying storage of a HLS part.
Click to show internal directories.
Click to hide internal directories.