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
Types ¶
type File ¶
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
func NewState ¶
NewState creates a new file state
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) SetStates ¶
SetStates overwrites all internal states with the given states array
Source Files
¶
- file.go
- file_other.go
- state.go
Click to show internal directories.
Click to hide internal directories.