Documentation ¶
Index ¶
- Constants
- type Adapter
- type AdapterCallBack
- type AdapterCallBacks
- type Config
- type ConfigCache
- type ConfigChangeCallBack
- type ConfigWatch
- type ConfigWatchMap
- type FieldInterface
- type FieldInterface_Bool
- type FieldInterface_Int
- type FieldInterface_Interface
- type FieldInterface_List
- type FieldInterface_Map
- type FieldInterface_String
- type FieldType
- type MconfigClient
- type MconfigClientV1
- func (m *MconfigClientV1) AdapterMconfigMergeToViper(viperArr ...*viper.Viper) error
- func (m *MconfigClientV1) Bool(key string, defaultVs ...bool) bool
- func (m *MconfigClientV1) Int64(key string, defaultVs ...int64) int64
- func (m *MconfigClientV1) Interface(key string, defaultV interface{}) interface{}
- func (m *MconfigClientV1) Map(key string, defaultVs ...map[string]interface{}) map[string]interface{}
- func (m *MconfigClientV1) OnWatchConfigChange(key string, f ConfigChangeCallBack)
- func (m *MconfigClientV1) SliceList(key string, defaultVs ...[]interface{}) []interface{}
- func (m *MconfigClientV1) String(key string, defaultVs ...string) string
- type Option
- func AppKey(appKey string) Option
- func ConfigKey(keys ...string) Option
- func DirectLinkAddress(address string) Option
- func EnvKey(envKey string) Option
- func Logger(log log.Logger) Option
- func Metadata(key string, value string) Option
- func NameSpace(namespace string) Option
- func Registry(registerUrl string) Option
- func RetryIntervalTime(t time.Duration) Option
- type Options
- type OriginConfigCache
- type Register_Type
- type WatchChange
Constants ¶
View Source
const ( // Default_Retry_Time ... Default_Retry_Time = 5 * time.Second // Default_NameSpace ... Default_NameSpace = "com.github.mhchlib" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterCallBacks ¶
AdapterCallBacks ...
type Config ¶
type Config interface { //base String(key string, defaultV ...string) string Int64(key string, defaultV ...int64) int64 Bool(key string, defaultV ...bool) bool Map(key string, defaultV ...map[string]interface{}) map[string]interface{} SliceList(key string, defaultV ...[]interface{}) []interface{} Interface(key string, defaultV interface{}) interface{} }
Config ...
type ConfigCache ¶
type ConfigCache struct { Cache map[string]*FieldInterface sync.RWMutex }
ConfigCache ...
type ConfigChangeCallBack ¶
type ConfigChangeCallBack func(key string, value interface{})
ConfigChangeCallBack ...
type ConfigWatch ¶
type ConfigWatch struct {
// contains filtered or unexported fields
}
ConfigWatch ...
type ConfigWatchMap ¶
ConfigWatchMap ...
func (*ConfigWatchMap) AddConfigChangeCallBack ¶
func (c *ConfigWatchMap) AddConfigChangeCallBack(key string, val interface{}, callback ConfigChangeCallBack)
AddConfigChangeCallBack ...
type FieldInterface ¶
type FieldInterface interface {
// contains filtered or unexported methods
}
FieldInterface ...
type FieldInterface_Interface ¶
type FieldInterface_Interface struct {
Value interface{}
}
FieldInterface_Interface ...
type FieldInterface_List ¶
type FieldInterface_List struct {
Value []interface{}
}
FieldInterface_List ...
type FieldInterface_Map ¶
type FieldInterface_Map struct {
Value map[string]interface{}
}
FieldInterface_Map ...
type FieldInterface_String ¶
type FieldInterface_String struct {
Value string
}
FieldInterface_String ...
type MconfigClientV1 ¶
type MconfigClientV1 struct {
// contains filtered or unexported fields
}
MconfigClientV1 ...
func (*MconfigClientV1) AdapterMconfigMergeToViper ¶
func (m *MconfigClientV1) AdapterMconfigMergeToViper(viperArr ...*viper.Viper) error
AdapterMconfigMergeToViper ...
func (*MconfigClientV1) Bool ¶
func (m *MconfigClientV1) Bool(key string, defaultVs ...bool) bool
Bool ...
func (*MconfigClientV1) Int64 ¶
func (m *MconfigClientV1) Int64(key string, defaultVs ...int64) int64
Int64 ...
func (*MconfigClientV1) Interface ¶
func (m *MconfigClientV1) Interface(key string, defaultV interface{}) interface{}
Interface ...
func (*MconfigClientV1) Map ¶
func (m *MconfigClientV1) Map(key string, defaultVs ...map[string]interface{}) map[string]interface{}
Map ...
func (*MconfigClientV1) OnWatchConfigChange ¶
func (m *MconfigClientV1) OnWatchConfigChange(key string, f ConfigChangeCallBack)
OnWatchConfigChange ...
func (*MconfigClientV1) SliceList ¶
func (m *MconfigClientV1) SliceList(key string, defaultVs ...[]interface{}) []interface{}
SliceList ...
type OriginConfigCache ¶
OriginConfigCache ...
func (OriginConfigCache) Put ¶
func (originConfigCache OriginConfigCache) Put(key string, value string)
Put ...
type Register_Type ¶
type Register_Type string
Register_Type ...
var ( // RegisterType_Etcd ... RegisterType_Etcd Register_Type = "etcd" )
type WatchChange ¶
type WatchChange interface {
OnWatchConfigChange(key string, f ConfigChangeCallBack)
}
WatchChange ...
Click to show internal directories.
Click to hide internal directories.