Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Proto string `json:"proto"`
Call string `json:"call"`
Cert string `json:"cert"`
CName string `json:"cName"`
N int `json:"n"`
C int `json:"c"`
QPS int `json:"q"`
Z time.Duration `json:"z"`
Timeout int `json:"t"`
Data interface{} `json:"d,omitempty"`
DataPath string `json:"D"`
Metadata *map[string]string `json:"m,omitempty"`
MetadataPath string `json:"M"`
Output string `json:"o"`
Format string `json:"O"`
Host string `json:"host"`
DialTimeout int `json:"T"`
KeepaliveTime int `json:"L"`
CPUs int `json:"cpus"`
ImportPaths []string `json:"i,omitempty"`
}
Config for the run.
func New ¶
func New(proto, call, cert, cName string, n, c, qps int, z time.Duration, timeout int, data, dataPath, metadata, mdPath, output, format, host string, dialTimout, keepaliveTime, cpus int, importPaths []string) (*Config, error)
NewConfig creates a new config
func ReadConfig ¶
ReadConfig reads the JSON config from path, applies the defaults and validates
func (*Config) Default ¶
func (c *Config) Default()
Default sets the defaults values for some of the properties that need to have valid values
func (Config) MarshalJSON ¶
MarshalJSON is our custom implementation to handle the Duration field Z
func (*Config) UnmarshalJSON ¶
UnmarshalJSON is our custom implementation to handle the Duration field Z and validate data
Click to show internal directories.
Click to hide internal directories.