Documentation
¶
Overview ¶
Package config provides abstraction for key-value runtime store
Index ¶
- type KVStore
- type SyncMapKVStore
- func (cfg *SyncMapKVStore) AllKeys() []string
- func (cfg *SyncMapKVStore) Get(key string) interface{}
- func (cfg *SyncMapKVStore) GetBool(key string) bool
- func (cfg *SyncMapKVStore) GetDuration(key string) time.Duration
- func (cfg *SyncMapKVStore) GetFloat64(key string) float64
- func (cfg *SyncMapKVStore) GetInt(key string) int
- func (cfg *SyncMapKVStore) GetInt32(key string) int32
- func (cfg *SyncMapKVStore) GetInt64(key string) int64
- func (cfg *SyncMapKVStore) GetIntSlice(key string) []int
- func (cfg *SyncMapKVStore) GetSizeInBytes(key string) uint
- func (cfg *SyncMapKVStore) GetString(key string) string
- func (cfg *SyncMapKVStore) GetStringMap(key string) map[string]interface{}
- func (cfg *SyncMapKVStore) GetStringMapStringSlice(key string) map[string][]string
- func (cfg *SyncMapKVStore) GetStringSlice(key string) []string
- func (cfg *SyncMapKVStore) GetTime(key string) (t time.Time)
- func (cfg *SyncMapKVStore) GetUint(key string) uint
- func (cfg *SyncMapKVStore) GetUint32(key string) uint32
- func (cfg *SyncMapKVStore) GetUint64(key string) uint64
- func (cfg *SyncMapKVStore) IsSet(key string) bool
- func (cfg *SyncMapKVStore) Set(key string, value interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KVStore ¶
type KVStore interface { // IsSet ... IsSet(key string) bool // Get ... Get(key string) interface{} // AllKeys ... AllKeys() []string // GetBool ... GetBool(key string) bool // GetTime ... GetTime(key string) time.Time // GetDuration ... GetDuration(key string) time.Duration // GetInt ... GetInt(key string) int // GetInt32 ... GetInt32(key string) int32 // GetInt64 ... GetInt64(key string) int64 // GetIntSlice ... GetIntSlice(key string) []int // GetString ... GetString(key string) string // GetStringSlice ... GetStringSlice(key string) []string // GetStringMap ... GetStringMap(key string) map[string]interface{} // GetStringMapStringSlice ... GetStringMapStringSlice(key string) map[string][]string // GetFloat64 ... GetFloat64(key string) float64 // GetUint ... GetUint(key string) uint // GetUint32 ... GetUint32(key string) uint32 // GetUint64 ... GetUint64(key string) uint64 // GetSizeInBytes ... GetSizeInBytes(key string) uint }
KVStore abstracts static-typed values reader from kv-store.
type SyncMapKVStore ¶
type SyncMapKVStore struct {
// contains filtered or unexported fields
}
SyncMapKVStore ...
func NewSyncMapConfig ¶
func NewSyncMapConfig(sm *sync.Map) *SyncMapKVStore
NewSyncMapConfig returns KVStore based on sync.Map storage.
func (*SyncMapKVStore) GetDuration ¶
func (cfg *SyncMapKVStore) GetDuration(key string) time.Duration
GetDuration ...
func (*SyncMapKVStore) GetFloat64 ¶
func (cfg *SyncMapKVStore) GetFloat64(key string) float64
GetFloat64 ...
func (*SyncMapKVStore) GetInt32 ¶
func (cfg *SyncMapKVStore) GetInt32(key string) int32
GetInt32 ...
func (*SyncMapKVStore) GetInt64 ¶
func (cfg *SyncMapKVStore) GetInt64(key string) int64
GetInt64 ...
func (*SyncMapKVStore) GetIntSlice ¶
func (cfg *SyncMapKVStore) GetIntSlice(key string) []int
GetIntSlice ...
func (*SyncMapKVStore) GetSizeInBytes ¶
func (cfg *SyncMapKVStore) GetSizeInBytes(key string) uint
GetSizeInBytes ...
func (*SyncMapKVStore) GetString ¶
func (cfg *SyncMapKVStore) GetString(key string) string
GetString ...
func (*SyncMapKVStore) GetStringMap ¶
func (cfg *SyncMapKVStore) GetStringMap(key string) map[string]interface{}
GetStringMap ...
func (*SyncMapKVStore) GetStringMapStringSlice ¶
func (cfg *SyncMapKVStore) GetStringMapStringSlice(key string) map[string][]string
GetStringMapStringSlice ...
func (*SyncMapKVStore) GetStringSlice ¶
func (cfg *SyncMapKVStore) GetStringSlice(key string) []string
GetStringSlice ...
func (*SyncMapKVStore) GetTime ¶
func (cfg *SyncMapKVStore) GetTime(key string) (t time.Time)
GetTime ...
func (*SyncMapKVStore) GetUint32 ¶
func (cfg *SyncMapKVStore) GetUint32(key string) uint32
GetUint32 ...
func (*SyncMapKVStore) GetUint64 ¶
func (cfg *SyncMapKVStore) GetUint64(key string) uint64
GetUint64 ...
Click to show internal directories.
Click to hide internal directories.