atomic

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicValue

type AtomicValue interface {
	LoadValue() interface{}
	StoreValue(v interface{})
	SetFromString(s string) error
}

AtomicValue is the generic interface for all atomic containers

type Bool

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

Bool is a thread-safe boolean container

func NewBool

func NewBool(initial bool) *Bool

func (*Bool) Load

func (b *Bool) Load() bool

func (*Bool) LoadValue

func (b *Bool) LoadValue() interface{}

... Bool implementation ...

func (*Bool) SetFromString added in v1.2.5

func (b *Bool) SetFromString(s string) error

func (*Bool) Store

func (b *Bool) Store(v bool)

func (*Bool) StoreValue

func (b *Bool) StoreValue(v interface{})

type Int

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

Int is a thread-safe integer container

func NewInt

func NewInt(initial int) *Int

func (*Int) Add

func (i *Int) Add(delta int) int

func (*Int) Load

func (i *Int) Load() int

func (*Int) LoadValue

func (i *Int) LoadValue() interface{}

func (*Int) SetFromString added in v1.2.5

func (i *Int) SetFromString(s string) error

func (*Int) Store

func (i *Int) Store(v int)

func (*Int) StoreValue

func (i *Int) StoreValue(v interface{})

func (*Int) Swap

func (i *Int) Swap(new int) int

type String

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

String is a thread-safe string container

func NewString

func NewString(initial string) *String

func (*String) Load

func (s *String) Load() string

func (*String) LoadValue

func (s *String) LoadValue() interface{}

... String implementation ...

func (*String) SetFromString added in v1.2.5

func (s *String) SetFromString(valStr string) error

func (*String) Store

func (s *String) Store(v string)

func (*String) StoreValue

func (s *String) StoreValue(v interface{})

Jump to

Keyboard shortcuts

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