Documentation
¶
Index ¶
- type Cfg
- type InMemKVS
- func (b *InMemKVS) Collect() map[string]any
- func (b *InMemKVS) CollectAsString() map[string]string
- func (b *InMemKVS) Del(k string)
- func (b *InMemKVS) Load(k string) (any, bool)
- func (b *InMemKVS) LoadAndDelete(k string) (any, bool)
- func (b *InMemKVS) LoadAsBool(k string) bool
- func (b *InMemKVS) LoadAsFloat(k string) float64
- func (b *InMemKVS) LoadAsFloatOr(k string, d float64) float64
- func (b *InMemKVS) LoadAsInt(k string) int
- func (b *InMemKVS) LoadAsIntOr(k string, d int) int
- func (b *InMemKVS) LoadAsString(k string) string
- func (b *InMemKVS) LoadAsStringOr(k string, d string) string
- func (b *InMemKVS) LoadAsUint(k string) uint
- func (b *InMemKVS) LoadAsUintOr(k string, d uint) uint
- func (b *InMemKVS) LoadOrStore(k string, v any) (any, bool)
- func (b *InMemKVS) LoadTo(k string, to any) error
- func (b *InMemKVS) Range(f func(k string, v any) bool)
- func (b *InMemKVS) Store(k string, v any)
- func (b *InMemKVS) StoreAsString(k string, v any)
- type InMemKVSCfg
- type KVS
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cfg ¶
type Cfg struct {
Type Type `yaml:"type" json:"type"`
Cfg interface{} `yaml:"cfg" json:"cfg"`
}
type InMemKVS ¶
type InMemKVS struct {
*InMemKVSCfg
// contains filtered or unexported fields
}
func NewInMemKVS ¶
func NewInMemKVS() *InMemKVS
func (*InMemKVS) CollectAsString ¶
func (*InMemKVS) LoadAsBool ¶
func (*InMemKVS) LoadAsFloat ¶
func (*InMemKVS) LoadAsString ¶
func (*InMemKVS) LoadAsUint ¶
func (*InMemKVS) StoreAsString ¶
type InMemKVSCfg ¶
type InMemKVSCfg struct{}
func NewInMemKVSCfg ¶
func NewInMemKVSCfg() *InMemKVSCfg
type KVS ¶
type KVS interface {
Store(k string, v any)
StoreAsString(k string, v any)
Load(k string) (any, bool)
LoadOrStore(k string, v any) (any, bool)
LoadAndDelete(k string) (any, bool)
Del(k string)
LoadAsBool(k string) bool
LoadAsString(k string) string
LoadAsStringOr(k string, d string) string
LoadAsInt(k string) int
LoadAsIntOr(k string, d int) int
LoadAsUint(k string) uint
LoadAsUintOr(k string, d uint) uint
LoadAsFloat(k string) float64
LoadAsFloatOr(k string, d float64) float64
LoadTo(k string, to any) error
Collect() map[string]any
CollectAsString() map[string]string
Range(func(k string, v any) bool)
}
Click to show internal directories.
Click to hide internal directories.