Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
func True ¶
True returns true if b is non-nil and true. This is convenience function related to *bool files in config structs, which is required for knowing when a bool config is explicitily set or not. If set, it's not changed; if not, it's set to the default value. That makes a good config experience but a less than ideal code experience because !*b will panic if b is nil, hence the need for this func.
Types ¶
type Base ¶
type Base struct { MySQL MySQL `yaml:"mysql,omitempty"` Params map[string]string `yaml:"params,omitempty"` Stats Stats `yaml:"stats,omitempty"` }
Base represents a base config file: _all.yaml. If it exists, it applies to all stage config files in the directory.
type ClientGroup ¶
type ClientGroup struct { Clients string `yaml:"clients,omitempty"` // uint Db string `yaml:"db,omitempty"` DisableStats bool `yaml:"disable-stats,omitempty"` Iter string `yaml:"iter,omitempty"` // uint IterClients string `yaml:"iter-clients,omitempty"` // uint IterExecGroup string `yaml:"iter-exec-group,omitempty"` // uint Group string `yaml:"group,omitempty"` QPS string `yaml:"qps,omitempty"` // uint QPSClients string `yaml:"qps-clients,omitempty"` // uint QPSExecGroup string `yaml:"qps-exec-group,omitempty"` // uint Runtime string `yaml:"runtime,omitempty"` TPS string `yaml:"tps,omitempty"` TPSClients string `yaml:"tps-clients,omitempty"` TPSExecGroup string `yaml:"tps-exec-group,omitempty"` Trx []string `yaml:"trx,omitempty"` }
func (*ClientGroup) Validate ¶
func (c *ClientGroup) Validate(w []Trx) error
type Compute ¶
type Data ¶
type MySQL ¶
type MySQL struct { Db string `yaml:"db,omitempty"` DSN string `yaml:"dsn,omitempty"` Hostname string `yaml:"hostname,omitempty"` MyCnf string `yaml:"mycnf,omitempty"` Password string `yaml:"password,omitempty"` PasswordFile string `yaml:"password-file,omitempty"` Socket string `yaml:"socket,omitempty"` TimeoutConnect string `yaml:"timeout-connect,omitempty"` TLS TLS `yaml:"tls,omitempty"` Username string `yaml:"username,omitempty"` DisableAutoTLS *bool `yaml:"disable-auto-tls,omitempty"` }
type Stage ¶
type Stage struct { Compute Compute `yaml:"compute,omitempty"` Disable bool `yaml:"disable"` File string `yaml:"-"` Id string `yaml:"-"` Name string `yaml:"name"` MySQL MySQL `yaml:"mysql,omitempty"` N uint `yaml:"-"` Params map[string]string `yaml:"params,omitempty"` QPS string `yaml:"qps,omitempty"` // uint Runtime string `yaml:"runtime,omitempty"` Stats Stats `yaml:"stats,omitempty"` TPS string `yaml:"tps,omitempty"` // uint Test bool `yaml:"-"` Trx []Trx `yaml:"trx,omitempty"` Workload []ClientGroup `yaml:"workload,omitempty"` }
Stage represents one stage config file. The stage config overwrites any base config (_all.yaml).
func (*Stage) CommandLine ¶
type Stats ¶
type TLS ¶
type TLS struct { CA string `yaml:"ca,omitempty"` // ssl-ca Cert string `yaml:"cert,omitempty"` // ssl-cert Key string `yaml:"key,omitempty"` // ssl-key SkipVerify *bool `yaml:"skip-verify,omitempty"` Disable *bool `yaml:"disable,omitempty"` // ssl-mode from a my.cnf (see dbconn.ParseMyCnf) MySQLMode string `yaml:"-"` }
Click to show internal directories.
Click to hide internal directories.