Documentation
¶
Index ¶
Constants ¶
View Source
const ( DockerPull = "pull" DockerRun = "run" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Docker ¶
type Docker struct {
Image string `yaml:"image"`
// Action can be pull, run
Action string `yaml:"action"`
Ports []Port `yaml:"ports"`
XXX map[string]interface{} `yaml:",inline"`
}
Docker run using docker
type Exec ¶
type Exec struct {
Command string `yaml:"command"`
Args []string `yaml:"args"`
// TODO: environment variable
XXX map[string]interface{} `yaml:",inline"`
}
Exec run task using os/exec where Command is path of binary or can be found in PATH
type Job ¶
type Job struct {
Name string `yaml:"name"`
Reason string `yaml:"reason"`
Framework string `yaml:"framework"`
Workload string `yaml:"workload"`
Database string `yaml:"database"`
Nodes []Node `yaml:"nodes"`
Stages []Stage `yaml:"stages"`
Pipelines []Pipeline `yaml:"pipelines"`
XXX map[string]interface{} `yaml:",inline"`
}
Job describes a benchmark job, it's hardware requirement, how to run the workload
type Node ¶
type Node struct {
// Name is used in config to refer specific node, it should be unique in job
Name string `yaml:"name"`
// Type specify type of nodes, currently only two types, database and loader
Type string `yaml:"type"`
// TODO: resource requirement
// TODO: tags?
XXX map[string]interface{} `yaml:",inline"`
}
Node describes requirement for different types of nodes and individual nodes
type NodeSelector ¶
type NodeSelector struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
XXX map[string]interface{} `yaml:",inline"`
}
NodeSelector is used by stages to select nodes to run task on
func (*NodeSelector) Validate ¶
func (c *NodeSelector) Validate() error
type Pipeline ¶
type Stage ¶
type Stage struct {
Name string `yaml:"name"`
Selectors []Node `yaml:"selectors"`
// Background specify if there are background task in this stage, a stage with background does not stop until specified
Background bool `yaml:"background"`
Tasks []Task `yaml:"tasks"`
XXX map[string]interface{} `yaml:",inline"`
}
type Task ¶
type Task struct {
// Background decides if the task is a long running process
Background bool `yaml:"background"`
Driver string `yaml:"driver"`
// Ready defines commands to check the server is up and running
// a background task is finished when all tasks in Ready can run without error
// there can NOT be background task in Ready
Ready []Task `yaml:"ready"`
// Shutdown defines commands to run after the long running process is killed
// TODO: though you can use docker stop to stop a background started by docker start ...
Shutdown []Task `yaml:"shutdown"`
// Drivers
Shell *Shell `yaml:"shell"`
Exec *Exec `yaml:"exec"`
Docker *Docker `yaml:"docker"`
XXX map[string]interface{} `yaml:",inline"`
}
Click to show internal directories.
Click to hide internal directories.