esoutput

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(params output.Params) (output.Output, error)

Types

type Config

type Config struct {
	Url                null.String `json:"url" envconfig:"K6_ELASTICSEARCH_URL"`
	CloudID            null.String `json:"cloud-id"  envconfig:"K6_ELASTICSEARCH_CLOUD_ID"`
	CACert             null.String `json:"caCertFile" envconfig:"K6_ELASTICSEARCH_CA_CERT_FILE"`
	InsecureSkipVerify null.Bool   `json:"insecureSkipVerify" envconfig:"K6_ELASTICSEARCH_INSECURE_SKIP_VERIFY"`

	User                null.String `json:"user" envconfig:"K6_ELASTICSEARCH_USER"`
	Password            null.String `json:"password" envconfig:"K6_ELASTICSEARCH_PASSWORD"`
	APIKey              null.String `json:"apiKey" envconfig:"K6_ELASTICSEARCH_API_KEY"`
	ServiceAccountToken null.String `json:"serviceAccountToken" envconfig:"K6_ELASTICSEARCH_SERVICE_ACCOUNT_TOKEN"`

	FlushPeriod types.NullDuration `json:"flushPeriod" envconfig:"K6_ELASTICSEARCH_FLUSH_PERIOD"`
	IndexName   null.String        `json:"indexName" envconfig:"K6_ELASTICSEARCH_INDEX_NAME"`
}

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

func ParseArg

func ParseArg(arg string) (Config, error)

ParseArg takes an arg string and converts it to a config

func (Config) Apply

func (base Config) Apply(applied Config) Config

type Output

type Output struct {
	output.SampleBuffer
	// contains filtered or unexported fields
}

func (*Output) Description

func (*Output) Description() string

func (*Output) Start

func (o *Output) Start() error

func (*Output) Stop

func (o *Output) Stop() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL