Documentation
¶
Index ¶
- func CopyImageBetweenNodes(ctx context.Context, sourceState *NodeState, destState *NodeState, ...) error
- type LocalNodeExec
- func (l *LocalNodeExec) Close() error
- func (l *LocalNodeExec) ExecuteCommand(command string, env map[string]string, onStdout func(string), ...) error
- func (l *LocalNodeExec) ExecuteOutput(command string, env map[string]string) (string, string, error)
- func (l *LocalNodeExec) Init() error
- func (l *LocalNodeExec) ReadFile(path string) ([]byte, error)
- func (l *LocalNodeExec) WriteFile(path string, data []byte) error
- type NodeExec
- type NodeManager
- type NodeState
- type RemoteNodeExec
- func (r *RemoteNodeExec) Close() error
- func (r *RemoteNodeExec) ExecuteCommand(command string, env map[string]string, onStdout func(string), ...) error
- func (r *RemoteNodeExec) ExecuteOutput(command string, env map[string]string) (string, string, error)
- func (r *RemoteNodeExec) Init() error
- func (r *RemoteNodeExec) ReadFile(path string) ([]byte, error)
- func (r *RemoteNodeExec) WriteFile(path string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LocalNodeExec ¶
type LocalNodeExec struct {
}
func NewLocalNodeExec ¶
func NewLocalNodeExec() *LocalNodeExec
func (*LocalNodeExec) Close ¶
func (l *LocalNodeExec) Close() error
func (*LocalNodeExec) ExecuteCommand ¶
func (*LocalNodeExec) ExecuteOutput ¶
func (*LocalNodeExec) Init ¶
func (l *LocalNodeExec) Init() error
type NodeExec ¶
type NodeExec interface {
Init() error
Close() error
WriteFile(path string, data []byte) error
ReadFile(path string) ([]byte, error)
ExecuteOutput(command string, env map[string]string) (string, string, error)
ExecuteCommand(
command string,
env map[string]string,
onStdout func(string),
onStderr func(string),
) error
}
type NodeManager ¶
type NodeManager struct {
// contains filtered or unexported fields
}
func NewNodeManager ¶
func NewNodeManager() *NodeManager
func (*NodeManager) AddOrGetNode ¶
func (m *NodeManager) AddOrGetNode(node *model.Node) (*NodeState, error)
func (*NodeManager) RemoveNode ¶
func (m *NodeManager) RemoveNode(nodeID int64) error
type NodeState ¶
type NodeState struct {
// contains filtered or unexported fields
}
func (*NodeState) GetDockerClient ¶
func (n *NodeState) GetDockerClient() (*dockerClient.Client, error)
func (*NodeState) GetNodeInfo ¶
type RemoteNodeExec ¶
type RemoteNodeExec struct {
// contains filtered or unexported fields
}
func NewRemoteNodeExec ¶
func NewRemoteNodeExec(node *model.Node) *RemoteNodeExec
func (*RemoteNodeExec) Close ¶
func (r *RemoteNodeExec) Close() error
func (*RemoteNodeExec) ExecuteCommand ¶
func (*RemoteNodeExec) ExecuteOutput ¶
func (*RemoteNodeExec) Init ¶
func (r *RemoteNodeExec) Init() error
Click to show internal directories.
Click to hide internal directories.