gatomic

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Any

type Any struct {
	// contains filtered or unexported fields
}

func NewAny

func NewAny(initValue interface{}) *Any

func (*Any) GetAndSet

func (s *Any) GetAndSet(f func(oldVal interface{}) (newVal interface{}))

func (*Any) SetVal

func (s *Any) SetVal(x interface{})

func (*Any) Val

func (s *Any) Val() (x interface{})

type Bool

type Bool struct {
	// contains filtered or unexported fields
}

func NewBool

func NewBool(initValue bool) *Bool

func (*Bool) IsFalse

func (s *Bool) IsFalse() bool

func (*Bool) IsTrue

func (s *Bool) IsTrue() bool

func (*Bool) SetFalse

func (s *Bool) SetFalse()

func (*Bool) SetTrue

func (s *Bool) SetTrue()

type Bytes

type Bytes struct {
	// contains filtered or unexported fields
}

func NewBytes

func NewBytes(initValue []byte) *Bytes

func (*Bytes) Append

func (s *Bytes) Append(bytes []byte)

func (*Bytes) Bytes

func (s *Bytes) Bytes() (x []byte)

func (*Bytes) CloneBytes

func (s *Bytes) CloneBytes() (x []byte)

func (*Bytes) Len

func (s *Bytes) Len() int

func (*Bytes) SetBytes

func (s *Bytes) SetBytes(data []byte)

type Float32

type Float32 struct {
	// contains filtered or unexported fields
}

func NewFloat32

func NewFloat32(initValue float32) *Float32

func (*Float32) Decrease

func (s *Float32) Decrease(cnt float32) (newValue float32)

func (*Float32) GetAndSet

func (s *Float32) GetAndSet(f func(oldVal float32) (newVal float32))

func (*Float32) Increase

func (s *Float32) Increase(cnt float32) (newValue float32)

func (*Float32) SetVal

func (s *Float32) SetVal(cnt float32)

func (*Float32) Val

func (s *Float32) Val() (value float32)

type Float64

type Float64 struct {
	// contains filtered or unexported fields
}

func NewFloat64

func NewFloat64(initValue float64) *Float64

func (*Float64) Decrease

func (s *Float64) Decrease(cnt float64) (newValue float64)

func (*Float64) GetAndSet

func (s *Float64) GetAndSet(f func(oldVal float64) (newVal float64))

func (*Float64) Increase

func (s *Float64) Increase(cnt float64) (newValue float64)

func (*Float64) SetVal

func (s *Float64) SetVal(cnt float64)

func (*Float64) Val

func (s *Float64) Val() (value float64)

type Int

type Int struct {
	// contains filtered or unexported fields
}

func NewInt

func NewInt(initValue int) *Int

func (*Int) Decrease

func (s *Int) Decrease(cnt int) (newValue int)

func (*Int) GetAndSet

func (s *Int) GetAndSet(f func(oldVal int) (newVal int))

func (*Int) Increase

func (s *Int) Increase(cnt int) (newValue int)

func (*Int) SetVal

func (s *Int) SetVal(cnt int)

func (*Int) Val

func (s *Int) Val() (value int)

type Int8

type Int8 struct {
	// contains filtered or unexported fields
}

func NewInt8

func NewInt8(initValue int8) *Int8

func (*Int8) Decrease

func (s *Int8) Decrease(cnt int8) (newValue int8)

func (*Int8) GetAndSet

func (s *Int8) GetAndSet(f func(oldVal int8) (newVal int8))

func (*Int8) Increase

func (s *Int8) Increase(cnt int8) (newValue int8)

func (*Int8) SetVal

func (s *Int8) SetVal(cnt int8)

func (*Int8) Val

func (s *Int8) Val() (value int8)

type Int32

type Int32 struct {
	// contains filtered or unexported fields
}

func NewInt32

func NewInt32(initValue int32) *Int32

func (*Int32) Decrease

func (s *Int32) Decrease(cnt int32) (newValue int32)

func (*Int32) GetAndSet

func (s *Int32) GetAndSet(f func(oldVal int32) (newVal int32))

func (*Int32) Increase

func (s *Int32) Increase(cnt int32) (newValue int32)

func (*Int32) SetVal

func (s *Int32) SetVal(cnt int32)

func (*Int32) Val

func (s *Int32) Val() (value int32)

type Int64

type Int64 struct {
	// contains filtered or unexported fields
}

func NewInt64

func NewInt64(initValue int64) *Int64

func (*Int64) Decrease

func (s *Int64) Decrease(cnt int64) (newValue int64)

func (*Int64) GetAndSet

func (s *Int64) GetAndSet(f func(oldVal int64) (newVal int64))

func (*Int64) Increase

func (s *Int64) Increase(cnt int64) (newValue int64)

func (*Int64) SetVal

func (s *Int64) SetVal(cnt int64)

func (*Int64) Val

func (s *Int64) Val() (value int64)

type String

type String struct {
	// contains filtered or unexported fields
}

func NewString

func NewString(initValue string) *String

func (*String) IsEmpty

func (s *String) IsEmpty() bool

func (*String) SetVal

func (s *String) SetVal(val string)

func (*String) String

func (s *String) String() string

func (*String) Val

func (s *String) Val() (x string)

type Uint

type Uint struct {
	// contains filtered or unexported fields
}

func NewUint

func NewUint(initValue uint) *Uint

func (*Uint) Decrease

func (s *Uint) Decrease(cnt uint) (newValue uint)

func (*Uint) GetAndSet

func (s *Uint) GetAndSet(f func(oldVal uint) (newVal uint))

func (*Uint) Increase

func (s *Uint) Increase(cnt uint) (newValue uint)

func (*Uint) SetVal

func (s *Uint) SetVal(cnt uint)

func (*Uint) Val

func (s *Uint) Val() (value uint)

type Uint8

type Uint8 struct {
	// contains filtered or unexported fields
}

func NewUint8

func NewUint8(initValue uint8) *Uint8

func (*Uint8) Decrease

func (s *Uint8) Decrease(cnt uint8) (newValue uint8)

func (*Uint8) GetAndSet

func (s *Uint8) GetAndSet(f func(oldVal uint8) (newVal uint8))

func (*Uint8) Increase

func (s *Uint8) Increase(cnt uint8) (newValue uint8)

func (*Uint8) SetVal

func (s *Uint8) SetVal(cnt uint8)

func (*Uint8) Val

func (s *Uint8) Val() (value uint8)

type Uint32

type Uint32 struct {
	// contains filtered or unexported fields
}

func NewUint32

func NewUint32(initValue uint32) *Uint32

func (*Uint32) Decrease

func (s *Uint32) Decrease(cnt uint32) (newValue uint32)

func (*Uint32) GetAndSet

func (s *Uint32) GetAndSet(f func(oldVal uint32) (newVal uint32))

func (*Uint32) Increase

func (s *Uint32) Increase(cnt uint32) (newValue uint32)

func (*Uint32) SetVal

func (s *Uint32) SetVal(cnt uint32)

func (*Uint32) Val

func (s *Uint32) Val() (value uint32)

type Uint64

type Uint64 struct {
	// contains filtered or unexported fields
}

func NewUint64

func NewUint64(initValue uint64) *Uint64

func (*Uint64) Decrease

func (s *Uint64) Decrease(cnt uint64) (newValue uint64)

func (*Uint64) GetAndSet

func (s *Uint64) GetAndSet(f func(oldVal uint64) (newVal uint64))

func (*Uint64) Increase

func (s *Uint64) Increase(cnt uint64) (newValue uint64)

func (*Uint64) SetVal

func (s *Uint64) SetVal(cnt uint64)

func (*Uint64) Val

func (s *Uint64) Val() (value uint64)

type Value

type Value struct {
	// contains filtered or unexported fields
}

func NewValue

func NewValue(initValue interface{}) *Value

func (*Value) GetAndSet

func (s *Value) GetAndSet(f func(oldVal interface{}) (newVal interface{}))

func (*Value) SetVal

func (s *Value) SetVal(x interface{})

func (*Value) Val

func (s *Value) Val() (x interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL