Documentation ¶
Overview ¶
Package atom provides atomic operations for integers, floats and strings. Inspired by the sync/atomic and go.uber.org/atomic packages from Go.
Index ¶
- Constants
- func LoadModule() (starlark.StringDict, error)
- type AtomicFloat
- func (a *AtomicFloat) Attr(name string) (starlark.Value, error)
- func (a *AtomicFloat) AttrNames() []string
- func (a *AtomicFloat) CompareSameType(op syntax.Token, y_ starlark.Value, depth int) (bool, error)
- func (a *AtomicFloat) Freeze()
- func (a *AtomicFloat) Hash() (uint32, error)
- func (a *AtomicFloat) String() string
- func (a *AtomicFloat) Truth() starlark.Bool
- func (a *AtomicFloat) Type() string
- type AtomicInt
- func (a *AtomicInt) Attr(name string) (starlark.Value, error)
- func (a *AtomicInt) AttrNames() []string
- func (a *AtomicInt) CompareSameType(op syntax.Token, y_ starlark.Value, depth int) (bool, error)
- func (a *AtomicInt) Freeze()
- func (a *AtomicInt) Hash() (uint32, error)
- func (a *AtomicInt) String() string
- func (a *AtomicInt) Truth() starlark.Bool
- func (a *AtomicInt) Type() string
- type AtomicString
- func (a *AtomicString) Attr(name string) (starlark.Value, error)
- func (a *AtomicString) AttrNames() []string
- func (a *AtomicString) CompareSameType(op syntax.Token, y_ starlark.Value, depth int) (bool, error)
- func (a *AtomicString) Freeze()
- func (a *AtomicString) Hash() (uint32, error)
- func (a *AtomicString) String() string
- func (a *AtomicString) Truth() starlark.Bool
- func (a *AtomicString) Type() string
Constants ¶
View Source
const ModuleName = "atom"
ModuleName defines the expected name for this Module when used in starlark's load() function, eg: load('atom', 'new_int')
Variables ¶
This section is empty.
Functions ¶
func LoadModule ¶
func LoadModule() (starlark.StringDict, error)
LoadModule loads the atom module. It is concurrency-safe and idempotent.
Types ¶
type AtomicFloat ¶
type AtomicFloat struct {
// contains filtered or unexported fields
}
func (*AtomicFloat) AttrNames ¶
func (a *AtomicFloat) AttrNames() []string
func (*AtomicFloat) CompareSameType ¶
func (*AtomicFloat) Freeze ¶
func (a *AtomicFloat) Freeze()
func (*AtomicFloat) Hash ¶
func (a *AtomicFloat) Hash() (uint32, error)
func (*AtomicFloat) String ¶
func (a *AtomicFloat) String() string
func (*AtomicFloat) Truth ¶
func (a *AtomicFloat) Truth() starlark.Bool
func (*AtomicFloat) Type ¶
func (a *AtomicFloat) Type() string
type AtomicInt ¶
type AtomicInt struct {
// contains filtered or unexported fields
}
func (*AtomicInt) CompareSameType ¶
type AtomicString ¶
type AtomicString struct {
// contains filtered or unexported fields
}
func (*AtomicString) AttrNames ¶
func (a *AtomicString) AttrNames() []string
func (*AtomicString) CompareSameType ¶
func (*AtomicString) Freeze ¶
func (a *AtomicString) Freeze()
func (*AtomicString) Hash ¶
func (a *AtomicString) Hash() (uint32, error)
func (*AtomicString) String ¶
func (a *AtomicString) String() string
func (*AtomicString) Truth ¶
func (a *AtomicString) Truth() starlark.Bool
func (*AtomicString) Type ¶
func (a *AtomicString) Type() string
Click to show internal directories.
Click to hide internal directories.