Documentation
¶
Index ¶
- func Parsekey(file string) (private ssh.Signer, err error)
- type Node
- type NodeList
- func (l NodeList) Close() error
- func (l NodeList) Connect() error
- func (l NodeList) Copy(src string, dest string) (chan Response, error)
- func (l NodeList) Each(fn func(*Node, func(Response) error) error) (chan Response, error)
- func (l NodeList) Execute(req Request) (chan Response, error)
- func (l NodeList) Filter(fn func(*Node) bool) NodeList
- func (l NodeList) Run(command string) (chan Response, error)
- func (l NodeList) Write(dest string, content *bytes.Reader) (chan Response, error)
- func (l NodeList) WriteBytes(dest string, content []byte) (chan Response, error)
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Node ¶
type Node struct { // Address of the node Host string // Port of the node Port uint // Username for user to authenticate User string // Authentication Method Auth []ssh.AuthMethod // contains filtered or unexported fields }
Node describes a server which will be managed.
type NodeList ¶
type NodeList []*Node
func (NodeList) Copy ¶
Copy a file from src to dest on each Node. The result will be channel of Responses for each Node in the NodeList.
func (NodeList) Each ¶
Perform an operation against each Node in the NodeList. The result will be channel of Responses for each Node in the NodeList.
func (NodeList) Execute ¶
Execute a Request against each Node in the NodeList. The result will be channel of Responses for each Node in the NodeList.
func (NodeList) Filter ¶
Filter a NodeList based on a predicate function. The predicate function should return true, if the Node in the list should be kept. Otherwise false should be returned. The result is a new NodeList containing the Nodes which the predicate function returned true for.
func (NodeList) Run ¶
Run a command against each Node in the NodeList. The result will be channel of Responses for each Node in the NodeList.