Documentation
¶
Overview ¶
This package provides an interface to functions and structs in the standard sync package to facilitate mocking.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MutexOption ¶ added in v0.0.11
MutexOption allows you to set options on a mutex in the NewMutex constructor
type PoolOption ¶ added in v0.0.11
PoolOption allows you to set options on a pool in the NewPool constructor
func WithNew ¶ added in v0.0.11
func WithNew(f func() any) PoolOption
Create a pool with a given New function
type RWMutexOption ¶ added in v0.0.11
RWMutexOption allows you to set options on a rw mutex in the NewRWMutex constructor
type Sync ¶
type Sync interface {
// Functions:
OnceFunc(func()) func()
// Constructors:
NewCond(Locker) Cond
NewMap() Map
NewMutex(...MutexOption) Mutex
NewOnce() Once
NewPool(...PoolOption) Pool
NewRWMutex(...RWMutexOption) RWMutex
NewWaitGroup(...WaitGroupOption) WaitGroup
}
type WaitGroupOption ¶ added in v0.0.11
waitGroupOption allows you to set options on a wait group in the NewWaitGroup constructor
func WithCount ¶ added in v0.0.11
func WithCount(nbr uint8) WaitGroupOption
Create a wait group with the given initial count
Click to show internal directories.
Click to hide internal directories.