Documentation
¶
Index ¶
- type Bool
- func (v *Bool) Cas(old, new bool) (swapped bool)
- func (v *Bool) Clone() *Bool
- func (v *Bool) MarshalJSON() ([]byte, error)
- func (v *Bool) Set(value bool) (old bool)
- func (v *Bool) String() string
- func (v *Bool) UnmarshalJSON(b []byte) error
- func (v *Bool) UnmarshalValue(value interface{}) error
- func (v *Bool) Val() bool
- type Int
- func (v *Int) Add(delta int) (new int)
- func (v *Int) Cas(old, new int) (swapped bool)
- func (v *Int) Clone() *Int
- func (v *Int) MarshalJSON() ([]byte, error)
- func (v *Int) Set(value int) (old int)
- func (v *Int) String() string
- func (v *Int) UnmarshalJSON(b []byte) error
- func (v *Int) UnmarshalValue(value interface{}) error
- func (v *Int) Val() int
- type Int32
- func (v *Int32) Add(delta int32) (new int32)
- func (v *Int32) Cas(old, new int32) (swapped bool)
- func (v *Int32) Clone() *Int32
- func (v Int32) MarshalJSON() ([]byte, error)
- func (v *Int32) Set(value int32) (old int32)
- func (v *Int32) String() string
- func (v *Int32) UnmarshalJSON(b []byte) error
- func (v *Int32) UnmarshalValue(value interface{}) error
- func (v *Int32) Val() int32
- type Int64
- func (v *Int64) Add(delta int64) (new int64)
- func (v *Int64) Cas(old, new int64) (swapped bool)
- func (v *Int64) Clone() *Int64
- func (v *Int64) MarshalJSON() ([]byte, error)
- func (v *Int64) Set(value int64) (old int64)
- func (v *Int64) String() string
- func (v *Int64) UnmarshalJSON(b []byte) error
- func (v *Int64) UnmarshalValue(value interface{}) error
- func (v *Int64) Val() int64
- type Interface
- func (v *Interface) Clone() *Interface
- func (v *Interface) MarshalJSON() ([]byte, error)
- func (v *Interface) Set(value interface{}) (old interface{})
- func (v *Interface) String() string
- func (v *Interface) UnmarshalJSON(b []byte) error
- func (v *Interface) UnmarshalValue(value interface{}) error
- func (v *Interface) Val() interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bool ¶
type Bool struct {
// contains filtered or unexported fields
}
Bool is a struct for concurrent-safe operation for type bool.
func NewBool ¶
NewBool creates and returns a concurrent-safe object for bool type, with given initial value <value>.
func (*Bool) MarshalJSON ¶
MarshalJSON implements the interface MarshalJSON for json.Marshal.
func (*Bool) Set ¶
Set atomically stores <value> into t.value and returns the previous value of t.value.
func (*Bool) UnmarshalJSON ¶
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
func (*Bool) UnmarshalValue ¶
UnmarshalValue is an interface implement which sets any type of value for <v>.
type Int ¶
type Int struct {
// contains filtered or unexported fields
}
Int is a struct for concurrent-safe operation for type int.
func NewInt ¶
NewInt creates and returns a concurrent-safe object for int type, with given initial value <value>.
func (*Int) MarshalJSON ¶
MarshalJSON implements the interface MarshalJSON for json.Marshal.
func (*Int) Set ¶
Set atomically stores <value> into t.value and returns the previous value of t.value.
func (*Int) UnmarshalJSON ¶
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
func (*Int) UnmarshalValue ¶
UnmarshalValue is an interface implement which sets any type of value for <v>.
type Int32 ¶
type Int32 struct {
// contains filtered or unexported fields
}
Int32 is a struct for concurrent-safe operation for type int32.
func NewInt32 ¶
NewInt32 creates and returns a concurrent-safe object for int32 type, with given initial value `value`.
func (Int32) MarshalJSON ¶
MarshalJSON implements the interface MarshalJSON for json.Marshal.
func (*Int32) Set ¶
Set atomically stores `value` into t.value and returns the previous value of t.value.
func (*Int32) UnmarshalJSON ¶
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
func (*Int32) UnmarshalValue ¶
UnmarshalValue is an interface implement which sets any type of value for `v`.
type Int64 ¶
type Int64 struct {
// contains filtered or unexported fields
}
Int64 is a struct for concurrent-safe operation for type int64.
func NewInt64 ¶
NewInt64 creates and returns a concurrent-safe object for int64 type, with given initial value <value>.
func (*Int64) MarshalJSON ¶
MarshalJSON implements the interface MarshalJSON for json.Marshal.
func (*Int64) Set ¶
Set atomically stores <value> into t.value and returns the previous value of t.value.
func (*Int64) UnmarshalJSON ¶
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
func (*Int64) UnmarshalValue ¶
UnmarshalValue is an interface implement which sets any type of value for <v>.
type Interface ¶
type Interface struct {
// contains filtered or unexported fields
}
Interface is a struct for concurrent-safe operation for type interface{}.
func NewInterface ¶
func NewInterface(value ...interface{}) *Interface
NewInterface creates and returns a concurrent-safe object for interface{} type, with given initial value <value>.
func (*Interface) Clone ¶
Clone clones and returns a new concurrent-safe object for interface{} type.
func (*Interface) MarshalJSON ¶
MarshalJSON implements the interface MarshalJSON for json.Marshal.
func (*Interface) Set ¶
func (v *Interface) Set(value interface{}) (old interface{})
Set atomically stores <value> into t.value and returns the previous value of t.value. Note: The parameter <value> cannot be nil.
func (*Interface) UnmarshalJSON ¶
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
func (*Interface) UnmarshalValue ¶
UnmarshalValue is an interface implement which sets any type of value for <v>.