Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferedWriter ¶
type BufferedWriter struct {
// contains filtered or unexported fields
}
BufferedWriter is a buffered writer
func NewBufferedWriter ¶
func NewBufferedWriter(writer Writer, chunkSize int, compressType compressedio.CompressType, accessRec *recording.AccessStats) *BufferedWriter
NewBufferedWriter is used to build a buffered writer.
func (*BufferedWriter) Close ¶
func (u *BufferedWriter) Close(ctx context.Context) error
Close implements Writer.
func (*BufferedWriter) GetWriter ¶
func (u *BufferedWriter) GetWriter() Writer
GetWriter get the underlying writer.
type Reader ¶
type Reader interface {
io.ReadSeekCloser
// GetFileSize returns the file size.
GetFileSize() (int64, error)
}
Reader represents the streaming external file reader.
type Writer ¶
type Writer interface {
// Write writes to buffer and if chunk is filled will upload it
Write(ctx context.Context, p []byte) (int, error)
// Close writes final chunk and completes the upload
Close(ctx context.Context) error
}
Writer represents the streaming external file writer.
func NewUploaderWriter ¶
func NewUploaderWriter(writer Writer, chunkSize int, compressType compressedio.CompressType) Writer
NewUploaderWriter wraps the Writer interface over an uploader.
Click to show internal directories.
Click to hide internal directories.