Documentation
¶
Index ¶
- func CreateTcpdumpHookIfEnabled() *backenddisruption.TcpdumpSamplerHook
- func FindOverlap(intervals monitorapi.Intervals, overlapsWith monitorapi.Interval) monitorapi.Intervals
- func IntervalsOverlap(interval1, interval2 monitorapi.Interval) bool
- func IsTransientAPIError(err error) bool
- func MoveTcpdumpToStorage(tcpdumpHook *backenddisruption.TcpdumpSamplerHook, storageDir string)
- func RetryWithExponentialBackoff(ctx context.Context, fn func() error) error
- func StopTcpdumpCollection(tcpdumpHook *backenddisruption.TcpdumpSamplerHook)
- func SystemdJournalLogTime(logLine string, year int) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTcpdumpHookIfEnabled ¶
func CreateTcpdumpHookIfEnabled() *backenddisruption.TcpdumpSamplerHook
CreateTcpdumpHookIfEnabled creates a tcpdump hook if DEBUG_ENABLE_TCPDUMP is enabled.
func FindOverlap ¶
func FindOverlap(intervals monitorapi.Intervals, overlapsWith monitorapi.Interval) monitorapi.Intervals
FindOverlap finds any intervals that overlap with the given interval.
func IntervalsOverlap ¶
func IntervalsOverlap(interval1, interval2 monitorapi.Interval) bool
IntervalsOverlap checks if two intervals overlap in time
func IsTransientAPIError ¶ added in v1.6.0
func MoveTcpdumpToStorage ¶
func MoveTcpdumpToStorage(tcpdumpHook *backenddisruption.TcpdumpSamplerHook, storageDir string)
MoveTcpdumpToStorage moves tcpdump pcap files to the storage directory if the hook is not nil. This should be called in the WriteContentToStorage method of monitor tests. It logs any errors but doesn't fail the entire storage operation.
func RetryWithExponentialBackoff ¶ added in v1.6.0
func StopTcpdumpCollection ¶
func StopTcpdumpCollection(tcpdumpHook *backenddisruption.TcpdumpSamplerHook)
StopTcpdumpCollection stops tcpdump collection if the hook is not nil. This should be called in the CollectData method of monitor tests.
func SystemdJournalLogTime ¶
SystemdJournalLogTime returns Now if there is trouble reading the time. This will stack the event intervals without parsable times at the end of the run, which will be more clearly visible as a problem than not reporting them.
Types ¶
This section is empty.