buffer

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCapacity = 512

DefaultCapacity is the size in bytes of a new BufferFile's backing buffer

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferFile

type BufferFile struct {
	// contains filtered or unexported fields
}

BufferFile allows reading parquet messages from a memory buffer.

func NewBufferFile

func NewBufferFile() *BufferFile

NewBufferFile creates new in memory parquet buffer.

func NewBufferFileCapacity

func NewBufferFileCapacity(cap int) *BufferFile

NewBufferFileCapacity starts the returned BufferFile with the given capacity

func NewBufferFileFromBytes

func NewBufferFileFromBytes(s []byte) *BufferFile

NewBufferFileFromBytes creates new in memory parquet buffer from the given bytes.

func (BufferFile) Bytes

func (bf BufferFile) Bytes() []byte

func (BufferFile) Close

func (bf BufferFile) Close() error

Close is a no-op for a memory buffer.

func (BufferFile) Create

func (bf BufferFile) Create(string) (source.ParquetFile, error)

func (BufferFile) Open

func (*BufferFile) Read

func (bf *BufferFile) Read(p []byte) (n int, err error)

Read reads data form BufferFile into p.

func (*BufferFile) Seek

func (bf *BufferFile) Seek(offset int64, whence int) (int64, error)

Seek seeks in the underlying memory buffer.

func (*BufferFile) Write

func (bf *BufferFile) Write(p []byte) (n int, err error)

Write writes data from p into BufferFile.

Jump to

Keyboard shortcuts

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