objectio

package
v1.1.0-beta.0...-05b396f Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

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.

func (*BufferedWriter) Write

func (u *BufferedWriter) Write(ctx context.Context, p []byte) (int, error)

Write implements Writer.

type EmptyFlusher

type EmptyFlusher struct{}

EmptyFlusher empty Flusher.

func (*EmptyFlusher) Flush

func (*EmptyFlusher) Flush() error

Flush do flush.

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.

Jump to

Keyboard shortcuts

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