config

package
v0.0.0-...-aec62d2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ErrEmptyQueryType = "query type cannot be empty"

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryGeneratorConfig

type QueryGeneratorConfig struct {
	common.BaseConfig
	Limit                uint64 `mapstructure:"queries"`
	QueryType            string `mapstructure:"query-type"`
	InterleavedGroupID   uint   `mapstructure:"interleaved-generation-group-id"`
	InterleavedNumGroups uint   `mapstructure:"interleaved-generation-groups"`

	// TODO - I think this needs some rethinking, but a simple, elegant solution escapes me right now
	TimescaleUseJSON       bool `mapstructure:"timescale-use-json"`
	TimescaleUseTags       bool `mapstructure:"timescale-use-tags"`
	TimescaleUseTimeBucket bool `mapstructure:"timescale-use-time-bucket"`

	ClickhouseUseTags bool `mapstructure:"clickhouse-use-tags"`

	MongoUseNaive bool   `mapstructure:"mongo-use-native"`
	DbName        string `mapstructure:"db-name"`
}

QueryGeneratorConfig is the GeneratorConfig that should be used with a QueryGenerator. It includes all the fields from a BaseConfig, as well as options that are specific to generating the queries to test against a database, such as the query type and individual database options.

func (*QueryGeneratorConfig) AddToFlagSet

func (c *QueryGeneratorConfig) AddToFlagSet(fs *pflag.FlagSet)

func (*QueryGeneratorConfig) Validate

func (c *QueryGeneratorConfig) Validate() error

Validate checks that the values of the QueryGeneratorConfig are reasonable.

Jump to

Keyboard shortcuts

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