Documentation ¶
Index ¶
- Constants
- type Agent
- type Controller
- type Manager
- func (m *Manager) DumpFlowAll() (map[string][]string, error)
- func (m *Manager) GetAgent(name string) (*Agent, error)
- func (m *Manager) GetController(name string) (*Controller, error)
- func (m *Manager) GetRandomAgent(except ...string) (*Agent, error)
- func (m *Manager) GetRandomController(except ...string) (*Controller, error)
- func (m *Manager) ListAgent() []*Agent
- func (m *Manager) ListController() []*Controller
- func (m *Manager) ServiceRestarter(minInterval, upwardFloatInterval int) *ServiceRestarter
- type Node
- type Service
- type ServiceRestarter
Constants ¶
View Source
const ( RoleController = "controller" RoleAgent = "agent" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
*Node
}
type Controller ¶
type Controller struct {
*Node
}
func (*Controller) FetchLog ¶
func (n *Controller) FetchLog() ([]byte, error)
func (*Controller) GetName ¶
func (n *Controller) GetName() string
func (*Controller) Healthz ¶
func (n *Controller) Healthz() (bool, error)
func (*Controller) Restart ¶
func (n *Controller) Restart() error
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manage and cached all nodes
func NewManager ¶
func NewManagerFromConfig ¶
func NewManagerFromConfig(nodesConfig *config.NodesConfig) (*Manager, error)
func (*Manager) GetController ¶
func (m *Manager) GetController(name string) (*Controller, error)
func (*Manager) GetRandomController ¶
func (m *Manager) GetRandomController(except ...string) (*Controller, error)
func (*Manager) ListController ¶
func (m *Manager) ListController() []*Controller
func (*Manager) ServiceRestarter ¶
func (m *Manager) ServiceRestarter(minInterval, upwardFloatInterval int) *ServiceRestarter
ServiceRestarter random restart controller and agent when e2e Deprecated, we should use external chaos engineering tools to replace restarter
type Node ¶
type Node struct { // Name is an unique identification of the node Name string // Roles identifies the type of node Roles sets.String // User name for connect to this node User string // Accessible address, such as 192.168.0.1:22 DialAddr string // Methonds for login into. If empty, file ~/.ssh/id_rsa be use. AuthMethods []ssh.AuthMethod // BridgeName only available when roles contains agent BridgeName string // contains filtered or unexported fields }
type ServiceRestarter ¶
type ServiceRestarter struct {
// contains filtered or unexported fields
}
ServiceRestarter control automatically restart part of services after every random interval.
func (*ServiceRestarter) Run ¶
func (c *ServiceRestarter) Run()
func (*ServiceRestarter) RunAsync ¶
func (c *ServiceRestarter) RunAsync()
Run it in another goroutine
func (*ServiceRestarter) Stop ¶
func (c *ServiceRestarter) Stop()
stop a living restarter and block here util the restarter is closed
Click to show internal directories.
Click to hide internal directories.