Documentation ¶
Index ¶
- func DiffMap(oldMap, newMap map[string]any) map[string]Change
- type AtomicEnum
- func (a *AtomicEnum[T]) CompareAndSwap(oldVal, newVal T) bool
- func (a *AtomicEnum[T]) Load() T
- func (a *AtomicEnum[T]) SetIf(newValue T, prevValue ...T) (T, bool)
- func (a *AtomicEnum[T]) SetIfNot(newValue T, prevValue ...T) (T, bool)
- func (a *AtomicEnum[T]) Store(v T)
- func (a *AtomicEnum[T]) Swap(newVal T) T
- type Change
- type FanOut
- type Integer
- type Signed
- type Unsigned
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AtomicEnum ¶
func (*AtomicEnum[T]) CompareAndSwap ¶
func (a *AtomicEnum[T]) CompareAndSwap(oldVal, newVal T) bool
func (*AtomicEnum[T]) Load ¶
func (a *AtomicEnum[T]) Load() T
func (*AtomicEnum[T]) SetIf ¶
func (a *AtomicEnum[T]) SetIf(newValue T, prevValue ...T) (T, bool)
SetIf updates the atomic value if the previous value matches one of the supplied values. It returns true if the value has been changed.
func (*AtomicEnum[T]) SetIfNot ¶
func (a *AtomicEnum[T]) SetIfNot(newValue T, prevValue ...T) (T, bool)
SetIfNot updates the atomic value if the previous value does not match any of the supplied values.
func (*AtomicEnum[T]) Store ¶
func (a *AtomicEnum[T]) Store(v T)
func (*AtomicEnum[T]) Swap ¶
func (a *AtomicEnum[T]) Swap(newVal T) T
Click to show internal directories.
Click to hide internal directories.