Versions in this module Expand all Collapse all v0 v0.4.0 Nov 14, 2019 Changes in this version + var DefaultDynamicFetchInterval = 5 * time.Second + var DefaultFetchTimeout = 1 * time.Second + var DefaultInitialConnectPeriod = 20 * time.Second + var DefaultStaticFetchInterval = 5 * time.Minute + func NewFetcher(handler TopoHandler, params discovery.FetchParams, filename string, ...) (*task, error) + type Config struct + Dynamic FetchConfig + Static StaticConfig + func (cfg *Config) ConfigName() string + func (cfg *Config) InitDefaults() + func (cfg *Config) Sample(dst io.Writer, path config.Path, ctx config.CtxMap) + func (cfg *Config) Validate() error + type ConnectParams struct + FailAction FailAction + InitialPeriod util.DurWrap + func (cfg *ConnectParams) ConfigName() string + func (cfg *ConnectParams) InitDefaults() + func (cfg *ConnectParams) Sample(dst io.Writer, path config.Path, _ config.CtxMap) + func (cfg *ConnectParams) Validate() error + type FailAction string + const FailActionContinue + const FailActionFatal + func (f *FailAction) UnmarshalText(text []byte) error + func (f *FailAction) Validate() error + type FetchConfig struct + Connect ConnectParams + Enable bool + Https bool + Interval util.DurWrap + Timeout util.DurWrap + func (cfg *FetchConfig) ConfigName() string + func (cfg *FetchConfig) InitDefaults() + func (cfg *FetchConfig) Sample(dst io.Writer, path config.Path, ctx config.CtxMap) + func (cfg *FetchConfig) Validate() error + type Runner struct + func (r *Runner) Kill() + type Runners struct + Cleaner *periodic.Runner + Dynamic *Runner + Static *Runner + func StartRunners(cfg Config, file discovery.File, handlers TopoHandlers, client *http.Client, ...) (Runners, error) + func (r *Runners) Kill() + type StaticConfig struct + Filename string + func (cfg *StaticConfig) ConfigName() string + func (cfg *StaticConfig) InitDefaults() + func (cfg *StaticConfig) Sample(dst io.Writer, path config.Path, ctx config.CtxMap) + type TopoHandler func(topo *topology.Topo) (bool, error) + type TopoHandlers struct + Dynamic TopoHandler + Static TopoHandler