Documentation
¶
Overview ¶
Package self contains codes for recording expvastic's own metrics. Here is a list of currently collected metrics:
ElasticSearch Var Name | expvastic var name ---------------------------------------------- Recorders | expRecorders Readers | expReaders Read Jobs | readJobs Record Jobs | recordJobs Errored Jobs | erroredJobs Records Distributed | recordsDistributed DataType Objects | datatypeObjs DataType Objects Errors | datatypeErrs Unidentified JSON Count | unidentifiedJSON StringType Count | stringTypeCount FloatType Count | floatTypeCount GCListType Count | gcListTypeCount ByteType Count | byteTypeCount Expvar Reads | expvarReads ElasticSearch Records | elasticsearchRecords
Index ¶
- Variables
- 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
- func (c *Config) TypeName() string
- type Reader
Constants ¶
This section is empty.
Variables ¶
View Source
var IgnoredEndpoint = "http://127.0.0.1:9200"
IgnoredEndpoint is used for testing
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SelfTypeName string `mapstructure:"type_name"` SelfInterval string `mapstructure:"interval"` SelfBackoff int `mapstructure:"backoff"` // contains filtered or unexported fields }
Config holds the necessary configuration for setting up an self reading facility.
func FromViper ¶
FromViper constructs the necessary configuration for bootstrapping the expvar reader
func (*Config) NewInstance ¶
NewInstance instantiates a SelfReader
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 NewReader ¶ added in v0.6.1
func NewReader( log logrus.FieldLogger, endpoint string, mapper datatype.Mapper, name, typeName string, interval time.Duration, timeout time.Duration, backoff int, ) (*Reader, error)
NewReader exposes expvastic's own metrics.
Click to show internal directories.
Click to hide internal directories.