Documentation ¶
Overview ¶
Package kafka sends real-time testing metrics to an Apache Kafka message broker
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Connection. Brokers []string `json:"brokers" envconfig:"K6_KAFKA_BROKERS"` // Samples. Topic null.String `json:"topic" envconfig:"K6_KAFKA_TOPIC"` User null.String `json:"user" envconfig:"K6_KAFKA_SASL_USER"` Password null.String `json:"password" envconfig:"K6_KAFKA_SASL_PASSWORD"` AuthMechanism null.String `json:"authMechanism" envconfig:"K6_KAFKA_AUTH_MECHANISM"` Format null.String `json:"format" envconfig:"K6_KAFKA_FORMAT"` PushInterval types.NullDuration `json:"pushInterval" envconfig:"K6_KAFKA_PUSH_INTERVAL"` Version null.String `json:"version" envconfig:"K6_KAFKA_VERSION"` SSL null.Bool `json:"ssl" envconfig:"K6_KAFKA_SSL"` InsecureSkipTLSVerify null.Bool `json:"insecureSkipTLSVerify" envconfig:"K6_KAFKA_INSECURE_SKIP_TLS_VERIFY"` LogError null.Bool `json:"logError" envconfig:"K6_KAFKA_LOG_ERROR"` InfluxDBConfig influxdbConfig `json:"influxdb"` }
Config is the config for the kafka collector
func GetConsolidatedConfig ¶
func GetConsolidatedConfig(jsonRawConf json.RawMessage, env map[string]string, arg string) (Config, error)
GetConsolidatedConfig combines {default config values + JSON config + environment vars + arg config values}, and returns the final result.
func NewConfig ¶
func NewConfig() Config
NewConfig creates a new Config instance with default values for some fields.
type Output ¶
type Output struct { output.SampleBuffer Config Config CloseFn func() error Producer sarama.AsyncProducer // contains filtered or unexported fields }
Output is a k6 output that sends metrics to a Kafka broker.
func (*Output) Description ¶
Description returns a short human-readable description of the output.
Click to show internal directories.
Click to hide internal directories.