Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct { *zap.SugaredLogger Config *Config FromBeginning bool SplitterFactory splitter.Factory Encoding encoding.Encoding HeaderConfig *header.Config }
func (*Factory) NewFingerprint ¶
func (f *Factory) NewFingerprint(file *os.File) (*fingerprint.Fingerprint, error)
func (*Factory) NewReader ¶
func (f *Factory) NewReader(file *os.File, fp *fingerprint.Fingerprint) (*Reader, error)
type Metadata ¶
type Metadata struct { Fingerprint *fingerprint.Fingerprint Offset int64 FileAttributes map[string]any HeaderFinalized bool }
type Reader ¶
Reader manages a single file
func (*Reader) NewFingerprintFromFile ¶
func (r *Reader) NewFingerprintFromFile() (*fingerprint.Fingerprint, error)
func (*Reader) ValidateOrClose ¶
ValidateOrClose returns true if the reader still has a valid file handle, false otherwise. If false is returned, the file handle should be considered closed.
It may create a new fingerprint from the old file handle and compare it to the previously known fingerprint. If there has been a change to the fingerprint (other than appended data), the file is considered truncated. Consequently, the reader will automatically close the file and drop the handle.
Click to show internal directories.
Click to hide internal directories.