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 NewMMapProtoReaderWithPath ¶
func NewMMapProtoReaderWithPath(path string) (*MMapProtoReader, error)
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 Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewProtoReaderWithPath ¶
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 }
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func NewWriter ¶
func NewWriter(writerOptions ...WriterOption) (*Writer, 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 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) }
type WriterOption ¶
type WriterOption func(*WriterOptions)
func CompressionType ¶
func CompressionType(p int) WriterOption
func File ¶
func File(p *os.File) WriterOption
func Path ¶
func Path(p string) WriterOption
type WriterOptions ¶
type WriterOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.