Documentation
¶
Index ¶
- type State
- type States
- func (s *States) Cleanup() (int, int)
- func (s *States) Copy() *States
- func (s *States) Count() int
- func (s *States) FindPrevious(newState State) State
- func (s *States) GetStates() []State
- func (s *States) SetStates(states []State)
- func (s *States) Update(newState State)
- func (s *States) UpdateWithTs(newState State, ts time.Time)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct { Finished bool `json:"-"` ZoneId string `json:"zone_id"` Timestamp time.Time `json:"timestamp"` Offset time.Time `json:"offset"` TTL time.Duration `json:"ttl"` // contains filtered or unexported fields }
func (*State) IsEqual ¶
IsEqual compares the state to an other state supporing stringer based on the unique string
func (*State) SetSuccess ¶
type States ¶
States handles list of FileState. One must use NewStates to instantiate a file states regisry. Using the zero-value is not safe.
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 and number of states that can be cleaned up in the future is returned.
func (*States) FindPrevious ¶
FindPrevious lookups a registered state, that matching the new state. Returns a zero-state if no match is found.
Click to show internal directories.
Click to hide internal directories.