config

package
v0.0.0-...-dfd9850 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Mode      string    `toml:"mode"`
	DSN1      string    `toml:"dsn1"`
	DSN2      string    `toml:"dsn2"`
	DSN3      string    `toml:"dsn3"`
	Options   Options   `toml:"options"`
	Generator Generator `toml:"generator"`
}

Config struct

func Init

func Init() *Config

Init get default Config

func (*Config) Copy

func (c *Config) Copy() *Config

Copy Config struct

func (*Config) Load

func (c *Config) Load(path string) error

Load config from file

type Generator

type Generator struct {
	SQLSmith SQLSmith
}

Generator Config

type Options

type Options struct {
	ClearDB       bool           `toml:"clear-db"`
	Stable        bool           `toml:"stable"`
	Reproduce     bool           `toml:"reproduce"`
	Concurrency   int            `toml:"concurrency"`
	InitTable     int            `toml:"init-table"`
	Path          string         `toml:"path"`
	Duration      types.Duration `toml:"duration"`
	CheckDuration types.Duration `toml:"check-duration"`
	OnlineDDL     bool           `toml:"online-ddl"`
	Serialize     bool           `toml:"serialize"`
	GeneralLog    bool           `toml:"general-log"`
	SyncTimeout   types.Duration `toml:"check-duration"`
	EnableHint    bool           `toml:"enable-hint"`
}

Options struct

type SQLSmith

type SQLSmith struct {
	TxnBegin           int `toml:"txn-begin"`
	TxnCommit          int `toml:"txn-commit"`
	TxnRollback        int `toml:"txn-rollback"`
	DDLCreateTable     int `toml:"ddl-create-table"`
	DDLAlterTable      int `toml:"ddl-alter-table"`
	DDLCreateIndex     int `toml:"ddl-create-index"`
	DMLSelect          int `toml:"dml-select"`
	DMLSelectForUpdate int `toml:"dml-select-for-update"`
	DMLDelete          int `toml:"dml-delete"`
	DMLUpdate          int `toml:"dml-update"`
	DMLInsert          int `toml:"dml-insert"`
	Sleep              int `toml:"sleep"`
}

SQLSmith for sqlsmith generator configuration only

Jump to

Keyboard shortcuts

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