Documentation
¶
Index ¶
- type Config
- func (c *Config) Backoff() int
- func (c *Config) Endpoint() string
- func (c *Config) Interval() time.Duration
- func (c *Config) Logger() logrus.FieldLogger
- func (c *Config) Name() string
- func (c *Config) NewInstance(ctx context.Context) (reader.DataReader, error)
- func (c *Config) RoutePath() string
- func (c *Config) Timeout() time.Duration
- type Reader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Endpoint_ string `mapstructure:"endpoint"` RoutePath_ string `mapstructure:"routepath"` Interval_ string `mapstructure:"interval"` Timeout_ string `mapstructure:"timeout"` LogLevel_ string `mapstructure:"log_level"` Backoff_ int `mapstructure:"backoff"` // contains filtered or unexported fields }
Config holds the necessary configuration for setting up an expvar reader endpoint.
func FromViper ¶
FromViper constructs the necessary configuration for bootstrapping the expvar reader
func (*Config) Logger ¶
func (c *Config) Logger() logrus.FieldLogger
func (*Config) NewInstance ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader contains communication channels with a worker that exposes expvar information. It implements DataReader interface.
func NewExpvarReader ¶
func NewExpvarReader(logger logrus.FieldLogger, ctxReader reader.ContextReader, name string, interval, timeout time.Duration) (*Reader, error)
NewExpvarReader creates the worker and sets up its channels. Because the caller is reading the resp.Body, it is its job to close it.
func (*Reader) ResultChan ¶
func (r *Reader) ResultChan() chan *reader.ReadJobResult
ResultChan returns the result channel.
Click to show internal directories.
Click to hide internal directories.