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 ¶
- 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, jobChan chan context.Context, ...) (reader.DataReader, error)
- func (c *Config) RoutePath() string
- func (c *Config) Timeout() time.Duration
- func (c *Config) TypeName() string
- type Reader
- func (r *Reader) Interval() time.Duration
- func (r *Reader) JobChan() chan context.Context
- func (r *Reader) Mapper() datatype.Mapper
- func (r *Reader) Name() string
- func (r *Reader) ResultChan() chan *reader.ReadJobResult
- func (r *Reader) Start(ctx context.Context) <-chan struct{}
- func (r *Reader) Timeout() time.Duration
- func (r *Reader) TypeName() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { TypeName_ string `mapstructure:"type_name"` Interval_ string `mapstructure:"interval"` // 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) Logger ¶
func (c *Config) Logger() logrus.FieldLogger
func (*Config) NewInstance ¶
func (c *Config) NewInstance(ctx context.Context, jobChan chan context.Context, resultChan chan *reader.ReadJobResult, errorChan chan<- communication.ErrorMessage) (reader.DataReader, error)
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 NewSelfReader ¶
func NewSelfReader( logger logrus.FieldLogger, mapper datatype.Mapper, jobChan chan context.Context, resultChan chan *reader.ReadJobResult, errorChan chan<- communication.ErrorMessage, name, typeName string, interval time.Duration, ) (*Reader, error)
NewSelfReader exposes expvastic's own metrics.
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.