Documentation
¶
Index ¶
- type ProtoFile
- func (pf *ProtoFile) Close() error
- func (pf *ProtoFile) Read(message proto.Message) (int64, error)
- func (pf *ProtoFile) ReadAt(pos int64, message proto.Message) (int64, error)
- func (pf *ProtoFile) Seek(pos int64) (int64, error)
- func (pf *ProtoFile) Stat() (os.FileInfo, error)
- func (pf *ProtoFile) Sync() error
- func (pf *ProtoFile) Tell() int64
- func (pf *ProtoFile) ValueStreamReader(ctx context.Context, chanSize int) <-chan *oproto.ValueStream
- func (pf *ProtoFile) Write(message proto.Message) (int64, error)
- func (pf *ProtoFile) WriteAt(pos int64, message proto.Message) (int64, error)
- type ReaderWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProtoFile ¶
type ProtoFile struct {
// contains filtered or unexported fields
}
ProtoFile contains information for reading and writing to a protofile. It is returned from either Read() or Write().
func (*ProtoFile) ValueStreamReader ¶
type ReaderWriter ¶
type ReaderWriter interface { Close() error Stat() (os.FileInfo, error) Tell() int64 Sync() error Seek(pos int64) (int64, error) Read(message proto.Message) (int64, error) ReadAt(pos int64, message proto.Message) (int64, error) ValueStreamReader(ctx context.Context, chanSize int) <-chan *oproto.ValueStream Write(message proto.Message) (int64, error) WriteAt(pos int64, message proto.Message) (int64, error) }
func Read ¶
func Read(filename string) (ReaderWriter, error)
func Write ¶
func Write(filename string) (ReaderWriter, error)
Write creates a file handle for writing a protofile, returning a ProtoFile. After calling this, the file is opened for writing and the file position it the end of the file, ready for appending.
Click to show internal directories.
Click to hide internal directories.