Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomicBool ¶
type AtomicBool struct {
// contains filtered or unexported fields
}
AtomicBool is a boolean representation that is synchronized for cross-goroutine use in multiple ways Initial value is always false
func (*AtomicBool) Do ¶
func (b *AtomicBool) Do(f func(value bool) bool)
Do will unconditionally execute a function (f), giving the current value to that function and setting the new value to whatever the function returns
func (*AtomicBool) DoIf ¶
func (b *AtomicBool) DoIf(value bool, f func() bool)
DoIf will execute a function (f) only if the value of the boolean is equal to the value provided, setting the new value to whatever the function returns
func (*AtomicBool) GetAndSet ¶
func (b *AtomicBool) GetAndSet(newValue bool) (oldValue bool)
GetAndSet will set a new value and return the prior value
type AtomicWork ¶
type AtomicWork struct {
// contains filtered or unexported fields
}
AtomicWork is a synchronized FIFO queue for work
func (*AtomicWork) GetRemainingCount ¶
func (w *AtomicWork) GetRemainingCount() int
func (*AtomicWork) GetWork ¶
func (w *AtomicWork) GetWork() *loadtest.TestContext
Pop pulls the next work item from the front of the queue, returning nil if no more work is available
func (*AtomicWork) Push ¶
func (w *AtomicWork) Push(context loadtest.TestContext)
Push adds more work to the end of the queue
func (*AtomicWork) PushMulti ¶
func (w *AtomicWork) PushMulti(contexts []loadtest.TestContext)
PushMulti adds multiple work items to the end of the queue
func (*AtomicWork) WorkRemaining ¶
func (w *AtomicWork) WorkRemaining() bool