Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAppCall returned by cocaine in very strange case ErrAppCall = errors.New("Application call error") ErrAppUnavailable = errors.New("Application is unavailable") // ErrLockOwned say about config alredy created in this zk session by this server ErrLockOwned = errors.New("Config lock owned") // ErrLockByAnother say about config alredy locked by another client ErrLockByAnother = errors.New("Config locked by another client") // ErrRTCGeoMissing ... ErrRTCGeoMissing = errors.New("RTCFetcher Geo not defined") // ErrMissingFormatSpecifier used by httpFetcher ErrMissingFormatSpecifier = errors.New(`Missing format specifier '%s' in BasicUrl`) // ErrNoHosts returned when fetcher cannot fetch hosts ErrNoHosts = errors.New("No hosts") )
Functions ¶
func RegisterFetcherLoader ¶ added in v1.8.0
func RegisterFetcherLoader(name string, f FetcherLoader) error
RegisterFetcherLoader register new fetcher loader function
Types ¶
type FetcherLoader ¶ added in v1.8.0
type FetcherLoader func(repository.PluginConfig) (HostFetcher, error)
FetcherLoader is type of function is responsible for loading fetchers
type HostFetcher ¶ added in v1.8.0
type HostFetcher interface { Fetch(group string) (hosts.Hosts, error) // contains filtered or unexported methods }
HostFetcher interface
func LoadHostFetcher ¶ added in v1.8.0
func LoadHostFetcher(config repository.PluginConfig) (HostFetcher, error)
LoadHostFetcher create, configure and return new hosts fetcher
func LoadHostFetcherWithCache ¶ added in v1.8.0
func LoadHostFetcherWithCache(config repository.PluginConfig, cache *cache.TTLCache) (HostFetcher, error)
LoadHostFetcherWithCache create, configure and return new hosts fetcher
type PredefineFetcher ¶ added in v1.8.0
type PredefineFetcher struct { PredefineFetcherConfig // contains filtered or unexported fields }
PredefineFetcher is map[string /*datacenter name*/][]string /*list of hosts*/
type PredefineFetcherConfig ¶ added in v1.8.0
PredefineFetcherConfig filled from combainer config
type QDNSFetcher ¶ added in v1.8.0
type QDNSFetcher struct { Resolver string QueryTimeout int64 // contains filtered or unexported fields }
QDNSFetcher recive hosts from dns discovery
type RTCFetcher ¶ added in v1.8.0
type RTCFetcher struct { ReadTimeout int64 Geo []string `mapstructure:"geo"` BasicURL string `mapstructure:"BasicUrl"` Delimiter string `mapstructure:"Delimiter"` // contains filtered or unexported fields }
RTCFetcher recive hosts from RTC groups
type SimpleFetcher ¶ added in v1.8.0
type SimpleFetcher struct { Separator string Format string ReadTimeout int64 Options map[string]string BasicURL string `mapstructure:"BasicUrl"` // contains filtered or unexported fields }
SimpleFetcher recive plain text with tab separated fields it expect format `fqdn\tdatacenter` or json configured by Format config
Click to show internal directories.
Click to hide internal directories.