Documentation ¶
Index ¶
Constants ¶
View Source
const ( IDALL = "all" // flag to get all stages' detail IDList = "list" ConfigSeparator = "---\n" // separator to join configuration ListSeparator = "," // separator to join stage list )
API constants
Variables ¶
View Source
var ( ErrNoCommand = errors.New("NoCommand") ErrNoTarget = errors.New("NoTarget") ErrUnknownTarget = errors.New("UnknownTarget") ErrCreateConnection = errors.New("ConnectFailed") )
errors for execution of raw command
View Source
var ( FIValueAgent = "agent" FIValueController = "controller" FIRole = "FI_ROLE" FIHTTP = "FI_HTTP" FIGRPC = "FI_GRPC" FIControllerGRPC = "FI_CONTROLLER_GRPC" FINodeRole = "FI_NODE_ROLE" FISelector = "FI_SELECTOR" ConfigPath = "path" )
configuration
Functions ¶
This section is empty.
Types ¶
type APIReturn ¶
type APIReturn struct { Status string `json:"status"` // process status Data map[string]interface{} `json:"data"` // result returned }
APIReturn is the HTTP return value
type Agent ¶
type Agent struct { AddressGRPC string // GRPC listen address ControllerAddress string // Controller GRPC address Role string // node role Selector map[string]string // selector SelectorStr string // selector string Version string // version NemesisManager *nemesis.Manager // nemesis manager }
Agent deployed with the nodes of cluster
func (*Agent) Exec ¶
func (a *Agent) Exec(ctx context.Context, req *pb.ExecRequest) (*pb.ExecResponse, error)
Exec run a command at the agent
func (*Agent) Nemesis ¶
func (a *Agent) Nemesis(ctx context.Context, req *pb.NemesisRequest) (*pb.NemesisResponse, error)
Nemesis manage a nemesis at the agent
type Controller ¶
type Controller struct { AddressGRPC string AddressHTTP string ConfigPath string TaskManager *control.TaskManager Config *config.ControllerConfig }
Controller is a impliment of GRPC
func NewController ¶
func NewController(config map[string]string) *Controller
NewController create a new Controller
func (*Controller) Register ¶
func (c *Controller) Register(ctx context.Context, r *pb.RegisterRequest) (*pb.RegisterResponse, error)
Register is a impliment of pb.Controller
Click to show internal directories.
Click to hide internal directories.