Documentation ¶
Index ¶
- type KVC
- type Key
- type MemKVC
- func (c *MemKVC) CompareAndSet(k Key, v Value, cmp func() bool) bool
- func (c *MemKVC) Get(k Key) Value
- func (c *MemKVC) GetAndSet(k Key, fn func(cur Value) Value)
- func (c *MemKVC) Has(k Key) bool
- func (c *MemKVC) Set(k Key, v Value)
- func (c *MemKVC) SetTTL(k Key, v Value, ttl time.Duration)
- func (m *MemKVC) UnsafeGet(k Key) Value
- func (m *MemKVC) UnsafeHas(k Key) bool
- func (m *MemKVC) UnsafeSet(k Key, v Value)
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KVC ¶
type MemKVC ¶
func (*MemKVC) CompareAndSet ¶
CompareAndSet sets the value if the cmp function returns true Only Unsafe* method's should be used in the cmp func since they do not acquire locks
Click to show internal directories.
Click to hide internal directories.