Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientConfig ¶
type ClientConfig struct { //指示从eureka服务器获取注册表信息的频率,默认30s RegistryFetchIntervalSeconds int `yaml:"registryFetchIntervalSeconds"` //客户端是否获取eureka服务器注册表上的注册信息,不调用其他微服务可以为false,默认为false FetchRegistry bool `yaml:"fetchRegistry"` //是否过滤掉非up实例,默认为false FilterOnlyUpInstances bool `yaml:"filterOnlyUpInstances"` //指示此实例是否应将其信息注册到eureka服务器以供其他服务发现,默认为false RegisterWithEureka bool `yaml:"registerWithEureka"` //client在shutdown情况下,是否显示从注册中心注销 ShouldUnregisterOnShutdown bool `yaml:"shouldUnregisterOnShutdown"` }
func (*ClientConfig) GetRegistryFetchIntervalSeconds ¶
func (config *ClientConfig) GetRegistryFetchIntervalSeconds() int
指示从eureka服务器获取注册表信息的频率,默认30秒
type Config ¶
type Config struct { ServiceURL struct { DefaultZone string `yaml:"defaultZone"` } `yaml:"serviceUrl"` ClientConfig ClientConfig `yaml:"client"` InstanceConfig struct { InstanceId string `yaml:"instanceId"` AppName string `yaml:"appName"` NonSecurePort int `yaml:"nonSecurePort"` NonSecurePortEnabled bool `yaml:"nonSecurePortEnabled"` SecurePort int `yaml:"securePort"` SecurePortEnabled bool `yaml:"securePortEnabled"` SecureVirtualHostName string `yaml:"secureVirtualHostName"` VirtualHostName string `yaml:"virtualHostName"` // HomePageUrlPath string `yaml:"homePageUrlPath"` StatusPageUrlPath string `yaml:"statusPageUrlPath"` HealthCheckUrlPath string `yaml:"healthCheckUrlPath"` // PreferIpAddress bool `yaml:"preferIpAddress"` InstanceEnabledOnInit bool `yaml:"instanceEnabledOnInit"` // CountryId int `yaml:"countryId"` Metadata map[string]interface{} `yaml:"metadata"` LeaseInfo struct { RenewalIntervalInSecs int `yaml:"renewalIntervalInSecs"` DurationInSecs int `yaml:"durationInSecs"` } `yaml:"leaseInfo"` } `yaml:"instance"` }
Click to show internal directories.
Click to hide internal directories.