Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSameFile ¶
IsSameFile checks if the given File path corresponds with the FileInfo given
func SafeFileRotate ¶
SafeFileRotate safely rotates an existing file under path and replaces it with the tempfile
Types ¶
type File ¶
func (*File) IsSameFile ¶
Checks if the two files are the same.
type State ¶
type State struct { Source string `json:"source"` Offset int64 `json:"offset"` Finished bool `json:"-"` // harvester state Fileinfo os.FileInfo `json:"-"` // the file info FileStateOS StateOS Timestamp time.Time `json:"timestamp"` TTL time.Duration `json:"ttl"` }
State is used to communicate the reading state of a file
type StateOS ¶
func GetOSState ¶
GetOSState returns the FileStateOS for non windows systems
type States ¶
type States struct {
// contains filtered or unexported fields
}
States handles list of FileState
func (*States) Cleanup ¶
Cleanup cleans up the state array. All states which are older then `older` are removed The number of states that were cleaned up is returned
func (*States) FindPrevious ¶
Click to show internal directories.
Click to hide internal directories.