Documentation ¶
Index ¶
- Constants
- func Abs(a int) int
- func Int16Max(in, max int16) int16
- func Int16Min(in, min int16) int16
- func Int32Max(in, max int32) int32
- func Int32Min(in, min int32) int32
- func Int64Max(in, max int64) int64
- func Int64Min(in, min int64) int64
- func Int8Max(in, max int8) int8
- func Int8Min(in, min int8) int8
- func Max(a, b int) int
- func Maxv(ints ...int) int
- func Min(a, b int) int
- func Minv(ints ...int) int
- func Uint16Max(in, max uint16) uint16
- func Uint16Min(in, min uint16) uint16
- func Uint32Max(in, max uint32) uint32
- func Uint32Min(in, min uint32) uint32
- func Uint64Max(in, max uint64) uint64
- func Uint64Min(in, min uint64) uint64
- func Uint8Max(in, max uint8) uint8
- func Uint8Min(in, min uint8) uint8
- func UintMax(in, max uint) uint
- func UintMin(in, min uint) uint
- type Decrementor
Constants ¶
View Source
const ( MaxUint = ^uint(0) MinUint = 0 MaxInt = int(MaxUint >> 1) MinInt = -MaxInt - 1 )
Constants
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Decrementor ¶
type Decrementor struct {
// contains filtered or unexported fields
}
Decrementor defines a class that allows multiple threads/processes to act upon to decrement a counter
func NewDecrementor ¶
func NewDecrementor(initialMax int64) *Decrementor
NewDecrementor will return a reference to a Decrementor object
func (*Decrementor) Decrement ¶
func (decrementor *Decrementor) Decrement() int
Decrement will decrement by 1 the initial max the class was instantiated with
func (*Decrementor) GetInitialMax ¶
func (decrementor *Decrementor) GetInitialMax() int
GetInitialMax will return the inital maximum value that was set upon instantiation
Click to show internal directories.
Click to hide internal directories.