Documentation ¶
Index ¶
- Constants
- Variables
- func Adapter(cfg *model.Bootstrap) (err error)
- func CheckYamlFormat(path string) bool
- func GetBootstrap() *model.Bootstrap
- func GetDiscoveryType(cfg *model.Bootstrap) (err error)
- func GetHttpConfig(cfg *model.Bootstrap) (err error)
- func GetLoadBalance(cfg *model.Bootstrap) (err error)
- func GetProtocol(cfg *model.Bootstrap) (err error)
- func Load(path string) *model.Bootstrap
- func LoadAPIConfig(metaConfig *model.APIMetaConfig) (*fc.APIConfig, error)
- func LoadAPIConfigFromFile(path string) (*fc.APIConfig, error)
- func LoadYAMLConfig(path string) *model.Bootstrap
- func RegisterConfigListener(li APIConfigResourceListener)
- func RegisterConfigLoadFunc(f LoadFunc)
- type APIConfigResourceListener
- type LoadFunc
Constants ¶
View Source
const (
Version = "0.4.0"
)
Variables ¶
View Source
var ( BASE_INFO_NAME = "name" BASE_INFO_DESC = "description" )
Functions ¶
func CheckYamlFormat ¶
func GetBootstrap ¶
GetBootstrap get config global, need a better name
func GetDiscoveryType ¶
func GetHttpConfig ¶
func GetLoadBalance ¶
func GetProtocol ¶
func LoadAPIConfig ¶
func LoadAPIConfig(metaConfig *model.APIMetaConfig) (*fc.APIConfig, error)
LoadAPIConfig load the api config from config center
func LoadAPIConfigFromFile ¶
LoadAPIConfigFromFile load the api config from file
func LoadYAMLConfig ¶
LoadYAMLConfig YAMLConfigLoad config load yaml
func RegisterConfigListener ¶
func RegisterConfigListener(li APIConfigResourceListener)
RegisterConfigListener register APIConfigListener
func RegisterConfigLoadFunc ¶
func RegisterConfigLoadFunc(f LoadFunc)
RegisterConfigLoadFunc can replace a new config load function instead of default
Types ¶
type APIConfigResourceListener ¶
type APIConfigResourceListener interface { // ResourceChange handle modify resource event ResourceChange(new fc.Resource, old fc.Resource) bool // bool is return for interface implement is interesting // ResourceAdd handle add resource event ResourceAdd(res fc.Resource) bool // ResourceDelete handle delete resource event ResourceDelete(deleted fc.Resource) bool // MethodChange handle modify method event MethodChange(res fc.Resource, method fc.Method, old fc.Method) bool // MethodAdd handle add method below one resource event MethodAdd(res fc.Resource, method fc.Method) bool // MethodDelete handle delete method event MethodDelete(res fc.Resource, method fc.Method) bool }
APIConfigResourceListener defines api resource and method config listener interface
Click to show internal directories.
Click to hide internal directories.