Documentation
¶
Index ¶
- Constants
- type CloudAdapter
- func (a *CloudAdapter) Apply() error
- func (a *CloudAdapter) Config() interface{}
- func (a *CloudAdapter) GetServiceNames() []string
- func (a *CloudAdapter) OnAddServiceInstance(instance *servicediscovery.ServiceInstance)
- func (a *CloudAdapter) OnDeleteServiceInstance(instance *servicediscovery.ServiceInstance)
- func (a *CloudAdapter) OnUpdateServiceInstance(instance *servicediscovery.ServiceInstance)
- func (a *CloudAdapter) Start()
- func (a *CloudAdapter) Stop()
- type CloudPlugin
- type Config
- type Service
- type SubscribePolicy
Constants ¶
View Source
const ( // Kind is the kind of Adapter Plugin. Kind = constant.SpringCloudAdapter Nacos = "nacos" Zookeeper = "zookeeper" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudAdapter ¶
type CloudAdapter struct {
// contains filtered or unexported fields
}
CloudAdapter the adapter for spring cloud
func (*CloudAdapter) Config ¶
func (a *CloudAdapter) Config() interface{}
Config get config for Adapter
func (*CloudAdapter) GetServiceNames ¶
func (a *CloudAdapter) GetServiceNames() []string
func (*CloudAdapter) OnAddServiceInstance ¶
func (a *CloudAdapter) OnAddServiceInstance(instance *servicediscovery.ServiceInstance)
func (*CloudAdapter) OnDeleteServiceInstance ¶
func (a *CloudAdapter) OnDeleteServiceInstance(instance *servicediscovery.ServiceInstance)
func (*CloudAdapter) OnUpdateServiceInstance ¶
func (a *CloudAdapter) OnUpdateServiceInstance(instance *servicediscovery.ServiceInstance)
type CloudPlugin ¶
type CloudPlugin struct { }
CloudPlugin the adapter plugin for spring cloud
func (*CloudPlugin) CreateAdapter ¶
CreateAdapter create adapter
type Config ¶
type Config struct { // Mode default 0 start backgroup fresh and watch, 1 only fresh 2 only watch Mode int `yaml:"mode" json:"mode" default:"mode"` Registry *model.RemoteConfig `yaml:"registry" json:"registry" default:"registry"` FreshInterval time.Duration `yaml:"freshInterval" json:"freshInterval" default:"freshInterval"` Services []string `yaml:"services" json:"services" default:"services"` // SubscribePolicy subscribe config, // - adapting : if there is no any Services (App) names, fetch All services from registry center // - definitely : fetch services by the config Services (App) names SubscribePolicy string `yaml:"subscribe-policy" json:"subscribe-policy" default:"adapting"` }
Config the config for CloudAdapter
type SubscribePolicy ¶
type SubscribePolicy int
const ( Adapting SubscribePolicy = iota Definitely )
func (SubscribePolicy) String ¶
func (sp SubscribePolicy) String() string
Click to show internal directories.
Click to hide internal directories.