Documentation
¶
Index ¶
- Variables
- func AssignConfWithDefault(defaultBaseConf ApolloBaseConfig, conf ...interface{})
- func BindEnv(config interface{}, prefix string)
- func GetSeparator() string
- func PrintDuration(printParam map[string]interface{}) func()
- func RefreshConf(conf interface{})
- func SetSeparator(sep string)
- type Apollo
- type ApolloAppConfig
- type ApolloBaseConfig
- type Duration
- type HttpUtil
- type NotifyComponent
- type Refresher
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Branch string MasterBranch = "master" DefaultNamespace = "application" )
Functions ¶
func AssignConfWithDefault ¶
func AssignConfWithDefault(defaultBaseConf ApolloBaseConfig, conf ...interface{})
func GetSeparator ¶
func GetSeparator() string
func PrintDuration ¶
func PrintDuration(printParam map[string]interface{}) func()
PrintDuration print the time duration function process. printParam contains the fields which will be appeared in the log.
func RefreshConf ¶
func RefreshConf(conf interface{})
func SetSeparator ¶
func SetSeparator(sep string)
Types ¶
type Apollo ¶
type Apollo struct {
ApolloBaseConfig
Cluster string `json:"cluster"`
NamespaceName string `json:"namespaceName"`
Config *ApolloAppConfig
}
func NewApolloConfig ¶
func NewApolloConfig(namespace string, defaultBaseConf ApolloBaseConfig, conf ...interface{}) *Apollo
type ApolloAppConfig ¶
type ApolloAppConfig struct {
AppId string `json:"appId"`
Cluster string `json:"cluster"`
NamespaceName string `json:"namespaceName"`
ReleaseKey string `json:"releaseKey"`
Configurations struct {
Content string `json:"content"`
} `json:"configurations"`
InputConf []interface{}
}
func (*ApolloAppConfig) Unmarshal ¶
func (ac *ApolloAppConfig) Unmarshal(rawBytes []byte) error
type ApolloBaseConfig ¶
type Duration ¶
type Duration struct {
// contains filtered or unexported fields
}
func NewDuration ¶
func NewDuration() *Duration
func (*Duration) GetAndReset ¶
type HttpUtil ¶
type HttpUtil struct {
Method string
Url string
RequestBody []byte
Timeout time.Duration
// contains filtered or unexported fields
}
func NewHttpUtil ¶
type NotifyComponent ¶
type NotifyComponent struct {
// contains filtered or unexported fields
}
func NewNotifyComponent ¶
func NewNotifyComponent(namespace string, worker chan bool) *NotifyComponent
Click to show internal directories.
Click to hide internal directories.