Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LocalIPString ¶
func LocalIPString() string
Types ¶
type Cluster ¶
type Cluster struct { // 兼容rpc-go ServiceClient数据结构 Name string `toml:"service_name"` LBType string `toml:"balancetype"` EndpointsFrom string `toml:"endpoints_from"` StaticEndpoints string `toml:"endpoints"` Proto string `toml:"proto"` // checker config CheckInterval Duration `toml:"check_interval"` UnHealthyThreshold uint32 `toml:"check_unhealth_threshold"` HealthyThreshold uint32 `toml:"check_healthy_threshold"` // lb advance config LBPanicThreshold int `toml:"lb_panic_threshold"` LBSubsetKeys [][]string `toml:"lb_subset_selectors"` LBDefaultKeys []string `toml:"lb_default_keys"` // detector config Detector Detector `toml:"detector"` Datacenter string `toml:"datacenter"` }
func NewCluster ¶
func NewCluster() Cluster
type Detector ¶
type Detector struct { DetectInterval Duration `toml:"detect_interval"` BaseEjectionDuration Duration `toml:"base_ejection_duration"` ConsecutiveError uint64 `toml:"consecutive_error"` ConsecutiveConnectionError uint64 `toml:"consecutive_connect_error"` MaxEjectionPercent uint64 `toml:"max_ejection_percent"` SuccessRateMinHosts uint64 `toml:"success_rate_min_hosts"` SuccessRateRequestVolume uint64 `toml:"success_rate_request_volume"` SuccessRateStdevFactor float64 `toml:"success_rate_stdev_factor"` EnforcingSuccessRate uint64 `toml:"enforcing_success_rate"` }
type Duration ¶
func (*Duration) UnmarshalText ¶
type FlagSet ¶
-- FlagSet
func NewFlagSet ¶
func NewFlagSet(name string, errorHandling flag.ErrorHandling) *FlagSet
func (*FlagSet) ParseFlags ¶
func (f *FlagSet) ParseFlags(args, environ, prefixes []string, p *properties.Properties) error
ParseFlags parses command line arguments and provides fallback values from environment variables and config file values. Environment variables are case-insensitive and can have either of the provided prefixes.
type Register ¶
type Register struct { ServiceName string ServiceAddr string ServicePort int ServiceCheckDSN string ServiceCheckIntervalMs int ServiceCheckTimeoutMs int DeregisterCriticalServiceAfterSec int ServiceTags map[string]string DerigesterCh chan bool TagsOverrideCh chan []string TagsWatchPath string }
func NewRegister ¶
Click to show internal directories.
Click to hide internal directories.