Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Glob ¶
Glob expands '**' patterns into multiple patterns to satisfy https://golang.org/pkg/path/filepath/#Match
func GlobPatterns ¶
GlobPatterns detects the use of "**" and expands it to standard glob patterns up to a max depth
func IsSameFile ¶
IsSameFile checks if the given File path corresponds with the FileInfo given
Types ¶
type File ¶
func (*File) IsSameFile ¶
Checks if the two files are the same.
type State ¶
type State struct { Id string `json:"-"` // local unique id to make comparison more efficient Finished bool `json:"-"` // harvester state Fileinfo os.FileInfo `json:"-"` // the file info Source string `json:"source"` Offset int64 `json:"offset"` Timestamp time.Time `json:"timestamp"` TTL time.Duration `json:"ttl"` Type string `json:"type"` FileStateOS StateOS }
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 ¶
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.