TestPoolMonitor exposes an *event.TestPoolMonitor and collects all events logged to that *event.TestPoolMonitor. It is safe to use from multiple concurrent goroutines.
type TestPoolMonitor struct { *event.PoolMonitor // contains filtered or unexported fields }
func NewTestPoolMonitor() *TestPoolMonitor
func (tpm *TestPoolMonitor) ClearEvents()
ClearEvents will reset the events collected by the testPoolMonitor.
func (tpm *TestPoolMonitor) Events(filters ...func(*event.PoolEvent) bool) []*event.PoolEvent
Events returns a copy of the events collected by the testPoolMonitor. Filters can optionally be applied to the returned events set and are applied using AND logic (i.e. all filters must return true to include the event in the result).
func (tpm *TestPoolMonitor) Interruptions() int
Interruptions returns the number of interruptions in the events recorded by the testPoolMonitor.
func (tpm *TestPoolMonitor) IsPoolCleared() bool
IsPoolCleared returns true if there are any events of type "event.PoolCleared" in the events recorded by the testPoolMonitor.