Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MMapProtoReader ¶
type MMapProtoReader struct {
// contains filtered or unexported fields
}
func (*MMapProtoReader) Close ¶
func (r *MMapProtoReader) Close() error
func (*MMapProtoReader) Open ¶
func (r *MMapProtoReader) Open() error
func (*MMapProtoReader) ReadNextAt ¶
type ReadAtI ¶
type ReadAtI interface { recordio.OpenClosableI // Reads the next record at the given offset into the passed message record, EOF error when it reaches the end signalled by (nil, io.EOF), implementation must be thread-safe ReadNextAt(record proto.Message, offset uint64) (proto.Message, error) }
this type is thread-safe
type ReaderI ¶
type ReaderI interface { recordio.OpenClosableI // Reads the next record into the passed message record, EOF error when it reaches the end signalled by (nil, io.EOF) ReadNext(record proto.Message) (proto.Message, error) // skips the next record, EOF error when it reaches the end signalled by io.EOF as the error SkipNext() error }
func NewProtoReaderWithFile
deprecated
func NewProtoReaderWithPath
deprecated
func NewReader ¶ added in v1.6.2
func NewReader(readerOptions ...ReaderOption) (ReaderI, error)
create a new reader with the given options. Either Path or File must be supplied
type ReaderOption ¶ added in v1.6.2
type ReaderOption func(*ReaderOptions)
func ReadBufferSizeBytes ¶ added in v1.6.2
func ReadBufferSizeBytes(p int) ReaderOption
func ReaderFile ¶ added in v1.6.2
func ReaderFile(p *os.File) ReaderOption
func ReaderPath ¶ added in v1.6.2
func ReaderPath(p string) ReaderOption
type ReaderOptions ¶ added in v1.6.2
type ReaderOptions struct {
// contains filtered or unexported fields
}
type WriterI ¶
type WriterI interface { recordio.OpenClosableI recordio.SizeI // Appends a record, returns the current offset this item was written to Write(record proto.Message) (uint64, error) // Appends a record and forces a disk sync, returns the current offset this item was written to WriteSync(record proto.Message) (uint64, error) }
func NewWriter ¶
func NewWriter(writerOptions ...WriterOption) (WriterI, error)
create a new writer with the given options. Either Path or File must be supplied, compression is optional and turned off by default.
type WriterOption ¶
type WriterOption func(*WriterOptions)
func CompressionType ¶
func CompressionType(p int) WriterOption
func DirectIO ¶ added in v1.3.0
func DirectIO() WriterOption
func File ¶
func File(p *os.File) WriterOption
func Path ¶
func Path(p string) WriterOption
func WriteBufferSizeBytes ¶ added in v1.3.0
func WriteBufferSizeBytes(p int) WriterOption
type WriterOptions ¶
type WriterOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.