package test
import "github.com/Azure/go-amqp/internal/test"
Index ¶
Functions ¶
func Diff ¶
func Equal ¶
Types ¶
type MuxSemaphore ¶
type MuxSemaphore struct {
// contains filtered or unexported fields
}
MuxSemaphore is a helper for managing rendezvous with the mux at certain points during execution.
func NewMuxSemaphore ¶
func NewMuxSemaphore(count int) *MuxSemaphore
NewMuxSemaphore creates a new MuxSemaphore with the specified count.
- count is the number of iterations the mux will execute before pausing
func (*MuxSemaphore) OnLoop ¶
func (m *MuxSemaphore) OnLoop()
OnLoop is to be called from your mux test hook. panics if the pause/resume cycle takes more than 5s.
func (*MuxSemaphore) Release ¶
func (m *MuxSemaphore) Release(count int)
Release - call this to resume the mux with a new count (zero-based)
- count is the number of iterations the mux will execute before pausing, pass -1 to close the semaphore
panics if the wait exceeds 5s.
func (*MuxSemaphore) Wait ¶
func (m *MuxSemaphore) Wait()
Wait - blocks until the mux is paused. panics if the wait exceeds 5s.
Source Files ¶
- Version
- v1.4.0 (latest)
- Published
- Feb 19, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 5 days ago –
Tools for package owners.