Documentation ¶
Index ¶
- type ApplyEventStats
- type DeleteEventStats
- type DisabledObjStats
- type PruneEventStats
- type SyncStats
- func (s *SyncStats) Empty() bool
- func (s SyncStats) String() string
- func (s *SyncStats) WithApplyEvents(status event.ApplyEventStatus, count uint64) *SyncStats
- func (s *SyncStats) WithDeleteEvents(status event.DeleteEventStatus, count uint64) *SyncStats
- func (s *SyncStats) WithDisabledObjStats(total, succeeded uint64) *SyncStats
- func (s *SyncStats) WithErrorEvents(count uint64) *SyncStats
- func (s *SyncStats) WithPruneEvents(status event.PruneEventStatus, count uint64) *SyncStats
- func (s *SyncStats) WithWaitEvent(status event.WaitEventStatus, count uint64) *SyncStats
- type WaitEventStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyEventStats ¶
type ApplyEventStats struct { // EventByOp tracks the number of ApplyType events including no error by ApplyEventOperation // Possible values: Created, Configured, Unchanged. EventByOp map[event.ApplyEventStatus]uint64 }
ApplyEventStats tracks the stats for all the ApplyType events
func (*ApplyEventStats) Add ¶
func (s *ApplyEventStats) Add(status event.ApplyEventStatus)
Add records a new event
func (*ApplyEventStats) Empty ¶
func (s *ApplyEventStats) Empty() bool
Empty returns true if no events were recorded.
func (*ApplyEventStats) Set ¶ added in v1.19.0
func (s *ApplyEventStats) Set(status event.ApplyEventStatus, count uint64)
Set records a total number of events
func (ApplyEventStats) String ¶
func (s ApplyEventStats) String() string
String returns the stats as a human readable string.
type DeleteEventStats ¶
type DeleteEventStats struct { // EventByOp tracks the number of DeleteType events including no error by DeleteEventOperation EventByOp map[event.DeleteEventStatus]uint64 }
DeleteEventStats tracks the stats for all the DeleteType events
func (*DeleteEventStats) Add ¶
func (s *DeleteEventStats) Add(status event.DeleteEventStatus)
Add records a new event
func (*DeleteEventStats) Empty ¶
func (s *DeleteEventStats) Empty() bool
Empty returns true if no events were recorded.
func (*DeleteEventStats) Set ¶ added in v1.19.0
func (s *DeleteEventStats) Set(status event.DeleteEventStatus, count uint64)
Set records a total number of events
func (DeleteEventStats) String ¶
func (s DeleteEventStats) String() string
String returns the stats as a human readable string.
type DisabledObjStats ¶
type DisabledObjStats struct { // Total tracks the number of objects to be disabled Total uint64 // Succeeded tracks how many ojbects were disabled successfully Succeeded uint64 }
DisabledObjStats tracks the stats for dsiabled objects
func (*DisabledObjStats) Empty ¶
func (s *DisabledObjStats) Empty() bool
Empty returns true if no events were recorded.
func (DisabledObjStats) String ¶
func (s DisabledObjStats) String() string
String returns the stats as a human readable String.
type PruneEventStats ¶
type PruneEventStats struct { // EventByOp tracks the number of PruneType events including no error by PruneEventOperation EventByOp map[event.PruneEventStatus]uint64 }
PruneEventStats tracks the stats for all the PruneType events
func (*PruneEventStats) Add ¶
func (s *PruneEventStats) Add(status event.PruneEventStatus)
Add records a new event
func (*PruneEventStats) Empty ¶
func (s *PruneEventStats) Empty() bool
Empty returns true if no events were recorded.
func (*PruneEventStats) Set ¶ added in v1.19.0
func (s *PruneEventStats) Set(status event.PruneEventStatus, count uint64)
Set records a total number of events
func (PruneEventStats) String ¶
func (s PruneEventStats) String() string
String returns the stats as a human readable string.
type SyncStats ¶
type SyncStats struct { ApplyEvent *ApplyEventStats PruneEvent *PruneEventStats DeleteEvent *DeleteEventStats WaitEvent *WaitEventStats DisableObjs *DisabledObjStats // ErrorTypeEvents tracks the number of ErrorType events ErrorTypeEvents uint64 }
SyncStats tracks the stats for all the events
func NewSyncStats ¶
func NewSyncStats() *SyncStats
NewSyncStats constructs a SyncStats with empty event maps.
func (*SyncStats) WithApplyEvents ¶ added in v1.19.0
func (s *SyncStats) WithApplyEvents(status event.ApplyEventStatus, count uint64) *SyncStats
WithApplyEvents sets the number of times this apply event status occurred. Intended for easy test expectation construction.
func (*SyncStats) WithDeleteEvents ¶ added in v1.19.0
func (s *SyncStats) WithDeleteEvents(status event.DeleteEventStatus, count uint64) *SyncStats
WithDeleteEvents sets the number of times this delete event status occurred. Intended for easy test expectation construction.
func (*SyncStats) WithDisabledObjStats ¶ added in v1.19.0
WithDisabledObjStats sets the disabled object stats. Intended for easy test expectation construction.
func (*SyncStats) WithErrorEvents ¶ added in v1.19.0
WithErrorEvents sets the total number of error events. Intended for easy test expectation construction.
func (*SyncStats) WithPruneEvents ¶ added in v1.19.0
func (s *SyncStats) WithPruneEvents(status event.PruneEventStatus, count uint64) *SyncStats
WithPruneEvents sets the number of times this prune event status occurred. Intended for easy test expectation construction.
func (*SyncStats) WithWaitEvent ¶ added in v1.19.0
func (s *SyncStats) WithWaitEvent(status event.WaitEventStatus, count uint64) *SyncStats
WithWaitEvent sets the number of times this wait event status occurred. Intended for easy test expectation construction.
type WaitEventStats ¶
type WaitEventStats struct { // EventByOp tracks the number of WaitType events including no error by WaitTypeOperation // Possible values: Pending, Successful, Skipped, Timeout, Failed EventByOp map[event.WaitEventStatus]uint64 }
WaitEventStats tracks the stats for all the WaitType events
func (*WaitEventStats) Add ¶
func (s *WaitEventStats) Add(status event.WaitEventStatus)
Add records a new event
func (*WaitEventStats) Empty ¶
func (s *WaitEventStats) Empty() bool
Empty returns true if no events were recorded.
func (*WaitEventStats) Set ¶ added in v1.19.0
func (s *WaitEventStats) Set(status event.WaitEventStatus, count uint64)
Set records a total number of events
func (WaitEventStats) String ¶
func (s WaitEventStats) String() string
String returns the stats as a human readable string.