atomic

package
v1.19.32-clash.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: GPL-3.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool struct {
	atomic.Bool
}

func NewBool

func NewBool(val bool) (i Bool)

func (*Bool) MarshalJSON

func (i *Bool) MarshalJSON() ([]byte, error)

func (*Bool) MarshalYAML

func (i *Bool) MarshalYAML() (any, error)

func (*Bool) String

func (i *Bool) String() string

func (*Bool) UnmarshalJSON

func (i *Bool) UnmarshalJSON(b []byte) error

func (*Bool) UnmarshalYAML

func (i *Bool) UnmarshalYAML(unmarshal func(any) error) error

type Int32

type Int32 struct {
	atomic.Int32
}

func NewInt32

func NewInt32(val int32) (i Int32)

func (*Int32) MarshalJSON

func (i *Int32) MarshalJSON() ([]byte, error)

func (*Int32) MarshalYAML

func (i *Int32) MarshalYAML() (any, error)

func (*Int32) String

func (i *Int32) String() string

func (*Int32) UnmarshalJSON

func (i *Int32) UnmarshalJSON(b []byte) error

func (*Int32) UnmarshalYAML

func (i *Int32) UnmarshalYAML(unmarshal func(any) error) error

type Int32Enum

type Int32Enum[T ~int32] struct {
	// contains filtered or unexported fields
}

func NewInt32Enum

func NewInt32Enum[T ~int32](v T) *Int32Enum[T]

func (*Int32Enum[T]) CompareAndSwap

func (i *Int32Enum[T]) CompareAndSwap(old, new T) bool

func (*Int32Enum[T]) Load

func (i *Int32Enum[T]) Load() T

func (*Int32Enum[T]) MarshalJSON

func (i *Int32Enum[T]) MarshalJSON() ([]byte, error)

func (*Int32Enum[T]) MarshalYAML

func (i *Int32Enum[T]) MarshalYAML() (any, error)

func (*Int32Enum[T]) Store

func (i *Int32Enum[T]) Store(v T)

func (*Int32Enum[T]) String

func (i *Int32Enum[T]) String() string

func (*Int32Enum[T]) Swap

func (i *Int32Enum[T]) Swap(new T) T

func (*Int32Enum[T]) UnmarshalJSON

func (i *Int32Enum[T]) UnmarshalJSON(b []byte) error

func (*Int32Enum[T]) UnmarshalYAML

func (i *Int32Enum[T]) UnmarshalYAML(unmarshal func(any) error) error

type Int64

type Int64 struct {
	atomic.Int64
}

func NewInt64

func NewInt64(val int64) (i Int64)

func (*Int64) MarshalJSON

func (i *Int64) MarshalJSON() ([]byte, error)

func (*Int64) MarshalYAML

func (i *Int64) MarshalYAML() (any, error)

func (*Int64) String

func (i *Int64) String() string

func (*Int64) UnmarshalJSON

func (i *Int64) UnmarshalJSON(b []byte) error

func (*Int64) UnmarshalYAML

func (i *Int64) UnmarshalYAML(unmarshal func(any) error) error

type Pointer

type Pointer[T any] struct {
	atomic.Pointer[T]
}

func NewPointer

func NewPointer[T any](v *T) (p Pointer[T])

func (*Pointer[T]) MarshalJSON

func (p *Pointer[T]) MarshalJSON() ([]byte, error)

func (*Pointer[T]) MarshalYAML

func (p *Pointer[T]) MarshalYAML() (any, error)

func (*Pointer[T]) String

func (p *Pointer[T]) String() string

func (*Pointer[T]) UnmarshalJSON

func (p *Pointer[T]) UnmarshalJSON(b []byte) error

func (*Pointer[T]) UnmarshalYAML

func (p *Pointer[T]) UnmarshalYAML(unmarshal func(any) error) error

type TypedValue

type TypedValue[T any] struct {
	// contains filtered or unexported fields
}

func NewTypedValue

func NewTypedValue[T any](t T) (v TypedValue[T])

func (*TypedValue[T]) CompareAndSwap

func (t *TypedValue[T]) CompareAndSwap(old, new T) bool

func (*TypedValue[T]) Load

func (t *TypedValue[T]) Load() (v T)

func (*TypedValue[T]) LoadOk

func (t *TypedValue[T]) LoadOk() (v T, ok bool)

func (*TypedValue[T]) MarshalJSON

func (t *TypedValue[T]) MarshalJSON() ([]byte, error)

func (*TypedValue[T]) MarshalYAML

func (t *TypedValue[T]) MarshalYAML() (any, error)

func (*TypedValue[T]) Store

func (t *TypedValue[T]) Store(value T)

func (*TypedValue[T]) Swap

func (t *TypedValue[T]) Swap(new T) (v T)

func (*TypedValue[T]) UnmarshalJSON

func (t *TypedValue[T]) UnmarshalJSON(b []byte) error

func (*TypedValue[T]) UnmarshalYAML

func (t *TypedValue[T]) UnmarshalYAML(unmarshal func(any) error) error

type Uint32

type Uint32 struct {
	atomic.Uint32
}

func NewUint32

func NewUint32(val uint32) (i Uint32)

func (*Uint32) MarshalJSON

func (i *Uint32) MarshalJSON() ([]byte, error)

func (*Uint32) MarshalYAML

func (i *Uint32) MarshalYAML() (any, error)

func (*Uint32) String

func (i *Uint32) String() string

func (*Uint32) UnmarshalJSON

func (i *Uint32) UnmarshalJSON(b []byte) error

func (*Uint32) UnmarshalYAML

func (i *Uint32) UnmarshalYAML(unmarshal func(any) error) error

type Uint64

type Uint64 struct {
	atomic.Uint64
}

func NewUint64

func NewUint64(val uint64) (i Uint64)

func (*Uint64) MarshalJSON

func (i *Uint64) MarshalJSON() ([]byte, error)

func (*Uint64) MarshalYAML

func (i *Uint64) MarshalYAML() (any, error)

func (*Uint64) String

func (i *Uint64) String() string

func (*Uint64) UnmarshalJSON

func (i *Uint64) UnmarshalJSON(b []byte) error

func (*Uint64) UnmarshalYAML

func (i *Uint64) UnmarshalYAML(unmarshal func(any) error) error

type Uintptr

type Uintptr struct {
	atomic.Uintptr
}

func NewUintptr

func NewUintptr(val uintptr) (i Uintptr)

func (*Uintptr) MarshalJSON

func (i *Uintptr) MarshalJSON() ([]byte, error)

func (*Uintptr) MarshalYAML

func (i *Uintptr) MarshalYAML() (any, error)

func (*Uintptr) String

func (i *Uintptr) String() string

func (*Uintptr) UnmarshalJSON

func (i *Uintptr) UnmarshalJSON(b []byte) error

func (*Uintptr) UnmarshalYAML

func (i *Uintptr) UnmarshalYAML(unmarshal func(any) error) error

Jump to

Keyboard shortcuts

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