Documentation ¶
Index ¶
- func MakeBatchConfig(conf Config) client.BatchPointsConfig
- func MakeClient(conf Config) (client.Client, error)
- type Collector
- func (c *Collector) Collect(scs []stats.SampleContainer)
- func (c *Collector) Format(samples []stats.Sample) ([]string, error)
- func (c *Collector) GetRequiredSystemTags() stats.SystemTagSet
- func (c *Collector) Init() error
- func (c *Collector) Link() string
- func (c *Collector) Run(ctx context.Context)
- func (c *Collector) SetRunStatus(status lib.RunStatus)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeBatchConfig ¶
func MakeBatchConfig(conf Config) client.BatchPointsConfig
Types ¶
type Collector ¶
type Collector struct { Client client.Client Config Config BatchConf client.BatchPointsConfig // contains filtered or unexported fields }
func (*Collector) Collect ¶
func (c *Collector) Collect(scs []stats.SampleContainer)
func (*Collector) Format ¶
Format returns a string array of metrics in influx line-protocol
func (*Collector) GetRequiredSystemTags ¶
func (c *Collector) GetRequiredSystemTags() stats.SystemTagSet
GetRequiredSystemTags returns which sample tags are needed by this collector
type Config ¶
type Config struct { // Connection. Addr null.String `json:"addr" envconfig:"K6_INFLUXDB_ADDR"` Username null.String `json:"username,omitempty" envconfig:"K6_INFLUXDB_USERNAME"` Password null.String `json:"password,omitempty" envconfig:"K6_INFLUXDB_PASSWORD"` Insecure null.Bool `json:"insecure,omitempty" envconfig:"K6_INFLUXDB_INSECURE"` PayloadSize null.Int `json:"payloadSize,omitempty" envconfig:"K6_INFLUXDB_PAYLOAD_SIZE"` PushInterval types.NullDuration `json:"pushInterval,omitempty" envconfig:"K6_INFLUXDB_PUSH_INTERVAL"` ConcurrentWrites null.Int `json:"concurrentWrites,omitempty" envconfig:"K6_INFLUXDB_CONCURRENT_WRITES"` // Samples. DB null.String `json:"db" envconfig:"K6_INFLUXDB_DB"` Precision null.String `json:"precision,omitempty" envconfig:"K6_INFLUXDB_PRECISION"` Retention null.String `json:"retention,omitempty" envconfig:"K6_INFLUXDB_RETENTION"` Consistency null.String `json:"consistency,omitempty" envconfig:"K6_INFLUXDB_CONSISTENCY"` TagsAsFields []string `json:"tagsAsFields,omitempty" envconfig:"K6_INFLUXDB_TAGS_AS_FIELDS"` }
func ParseArg ¶
ParseArg parses an argument string into a Config
func ParseMap ¶
ParseMap parses a map[string]interface{} into a Config
Click to show internal directories.
Click to hide internal directories.