Documentation
¶
Index ¶
- type MockNodeClient
- func (_mock *MockNodeClient) CopyFile(n *Node, src string, dst string) error
- func (_m *MockNodeClient) EXPECT() *MockNodeClient_Expecter
- func (_mock *MockNodeClient) HasFile(n *Node, filePath string) bool
- func (_mock *MockNodeClient) RunCommand(n *Node, username string, command string) error
- func (_mock *MockNodeClient) WaitReady(n *Node, timeout time.Duration) error
- type MockNodeClient_CopyFile_Call
- func (_c *MockNodeClient_CopyFile_Call) Return(err error) *MockNodeClient_CopyFile_Call
- func (_c *MockNodeClient_CopyFile_Call) Run(run func(n *Node, src string, dst string)) *MockNodeClient_CopyFile_Call
- func (_c *MockNodeClient_CopyFile_Call) RunAndReturn(run func(n *Node, src string, dst string) error) *MockNodeClient_CopyFile_Call
- type MockNodeClient_Expecter
- func (_e *MockNodeClient_Expecter) CopyFile(n interface{}, src interface{}, dst interface{}) *MockNodeClient_CopyFile_Call
- func (_e *MockNodeClient_Expecter) HasFile(n interface{}, filePath interface{}) *MockNodeClient_HasFile_Call
- func (_e *MockNodeClient_Expecter) RunCommand(n interface{}, username interface{}, command interface{}) *MockNodeClient_RunCommand_Call
- func (_e *MockNodeClient_Expecter) WaitReady(n interface{}, timeout interface{}) *MockNodeClient_WaitReady_Call
- type MockNodeClient_HasFile_Call
- func (_c *MockNodeClient_HasFile_Call) Return(b bool) *MockNodeClient_HasFile_Call
- func (_c *MockNodeClient_HasFile_Call) Run(run func(n *Node, filePath string)) *MockNodeClient_HasFile_Call
- func (_c *MockNodeClient_HasFile_Call) RunAndReturn(run func(n *Node, filePath string) bool) *MockNodeClient_HasFile_Call
- type MockNodeClient_RunCommand_Call
- func (_c *MockNodeClient_RunCommand_Call) Return(err error) *MockNodeClient_RunCommand_Call
- func (_c *MockNodeClient_RunCommand_Call) Run(run func(n *Node, username string, command string)) *MockNodeClient_RunCommand_Call
- func (_c *MockNodeClient_RunCommand_Call) RunAndReturn(run func(n *Node, username string, command string) error) *MockNodeClient_RunCommand_Call
- type MockNodeClient_WaitReady_Call
- func (_c *MockNodeClient_WaitReady_Call) Return(err error) *MockNodeClient_WaitReady_Call
- func (_c *MockNodeClient_WaitReady_Call) Run(run func(n *Node, timeout time.Duration)) *MockNodeClient_WaitReady_Call
- func (_c *MockNodeClient_WaitReady_Call) RunAndReturn(run func(n *Node, timeout time.Duration) error) *MockNodeClient_WaitReady_Call
- type Node
- func (n *Node) ConfigureAcceptEnv() error
- func (n *Node) ConfigureInotifyWatches() error
- func (n *Node) ConfigureMemoryMap() error
- func (n *Node) CreateSubNode(name string, externalIP string, internalIP string) *Node
- func (n *Node) EnableRootLogin() error
- func (n *Node) GetExternalIP() string
- func (n *Node) GetInternalIP() string
- func (n *Node) GetName() string
- func (n *Node) HasAcceptEnvConfigured() bool
- func (n *Node) HasCommand(command string) bool
- func (n *Node) HasInotifyWatchesConfigured() bool
- func (n *Node) HasMemoryMapConfigured() bool
- func (n *Node) HasRootLoginEnabled() bool
- func (n *Node) InstallOms() error
- func (n *Node) RunSSHCommand(username string, command string) error
- func (n *Node) UpdateNode(name string, externalIP string, internalIP string)
- type NodeClient
- type SSHNodeClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockNodeClient ¶ added in v0.32.1
MockNodeClient is an autogenerated mock type for the NodeClient type
func NewMockNodeClient ¶ added in v0.32.1
func NewMockNodeClient(t interface {
mock.TestingT
Cleanup(func())
}) *MockNodeClient
NewMockNodeClient creates a new instance of MockNodeClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockNodeClient) CopyFile ¶ added in v0.32.1
func (_mock *MockNodeClient) CopyFile(n *Node, src string, dst string) error
CopyFile provides a mock function for the type MockNodeClient
func (*MockNodeClient) EXPECT ¶ added in v0.32.1
func (_m *MockNodeClient) EXPECT() *MockNodeClient_Expecter
func (*MockNodeClient) HasFile ¶ added in v0.32.1
func (_mock *MockNodeClient) HasFile(n *Node, filePath string) bool
HasFile provides a mock function for the type MockNodeClient
func (*MockNodeClient) RunCommand ¶ added in v0.32.1
func (_mock *MockNodeClient) RunCommand(n *Node, username string, command string) error
RunCommand provides a mock function for the type MockNodeClient
type MockNodeClient_CopyFile_Call ¶ added in v0.32.1
MockNodeClient_CopyFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CopyFile'
func (*MockNodeClient_CopyFile_Call) Return ¶ added in v0.32.1
func (_c *MockNodeClient_CopyFile_Call) Return(err error) *MockNodeClient_CopyFile_Call
func (*MockNodeClient_CopyFile_Call) Run ¶ added in v0.32.1
func (_c *MockNodeClient_CopyFile_Call) Run(run func(n *Node, src string, dst string)) *MockNodeClient_CopyFile_Call
func (*MockNodeClient_CopyFile_Call) RunAndReturn ¶ added in v0.32.1
func (_c *MockNodeClient_CopyFile_Call) RunAndReturn(run func(n *Node, src string, dst string) error) *MockNodeClient_CopyFile_Call
type MockNodeClient_Expecter ¶ added in v0.32.1
type MockNodeClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockNodeClient_Expecter) CopyFile ¶ added in v0.32.1
func (_e *MockNodeClient_Expecter) CopyFile(n interface{}, src interface{}, dst interface{}) *MockNodeClient_CopyFile_Call
CopyFile is a helper method to define mock.On call
- n *Node
- src string
- dst string
func (*MockNodeClient_Expecter) HasFile ¶ added in v0.32.1
func (_e *MockNodeClient_Expecter) HasFile(n interface{}, filePath interface{}) *MockNodeClient_HasFile_Call
HasFile is a helper method to define mock.On call
- n *Node
- filePath string
func (*MockNodeClient_Expecter) RunCommand ¶ added in v0.32.1
func (_e *MockNodeClient_Expecter) RunCommand(n interface{}, username interface{}, command interface{}) *MockNodeClient_RunCommand_Call
RunCommand is a helper method to define mock.On call
- n *Node
- username string
- command string
func (*MockNodeClient_Expecter) WaitReady ¶ added in v0.32.1
func (_e *MockNodeClient_Expecter) WaitReady(n interface{}, timeout interface{}) *MockNodeClient_WaitReady_Call
WaitReady is a helper method to define mock.On call
- n *Node
- timeout time.Duration
type MockNodeClient_HasFile_Call ¶ added in v0.32.1
MockNodeClient_HasFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasFile'
func (*MockNodeClient_HasFile_Call) Return ¶ added in v0.32.1
func (_c *MockNodeClient_HasFile_Call) Return(b bool) *MockNodeClient_HasFile_Call
func (*MockNodeClient_HasFile_Call) Run ¶ added in v0.32.1
func (_c *MockNodeClient_HasFile_Call) Run(run func(n *Node, filePath string)) *MockNodeClient_HasFile_Call
func (*MockNodeClient_HasFile_Call) RunAndReturn ¶ added in v0.32.1
func (_c *MockNodeClient_HasFile_Call) RunAndReturn(run func(n *Node, filePath string) bool) *MockNodeClient_HasFile_Call
type MockNodeClient_RunCommand_Call ¶ added in v0.32.1
MockNodeClient_RunCommand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunCommand'
func (*MockNodeClient_RunCommand_Call) Return ¶ added in v0.32.1
func (_c *MockNodeClient_RunCommand_Call) Return(err error) *MockNodeClient_RunCommand_Call
func (*MockNodeClient_RunCommand_Call) Run ¶ added in v0.32.1
func (_c *MockNodeClient_RunCommand_Call) Run(run func(n *Node, username string, command string)) *MockNodeClient_RunCommand_Call
func (*MockNodeClient_RunCommand_Call) RunAndReturn ¶ added in v0.32.1
func (_c *MockNodeClient_RunCommand_Call) RunAndReturn(run func(n *Node, username string, command string) error) *MockNodeClient_RunCommand_Call
type MockNodeClient_WaitReady_Call ¶ added in v0.32.1
MockNodeClient_WaitReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitReady'
func (*MockNodeClient_WaitReady_Call) Return ¶ added in v0.32.1
func (_c *MockNodeClient_WaitReady_Call) Return(err error) *MockNodeClient_WaitReady_Call
func (*MockNodeClient_WaitReady_Call) Run ¶ added in v0.32.1
func (_c *MockNodeClient_WaitReady_Call) Run(run func(n *Node, timeout time.Duration)) *MockNodeClient_WaitReady_Call
func (*MockNodeClient_WaitReady_Call) RunAndReturn ¶ added in v0.32.1
func (_c *MockNodeClient_WaitReady_Call) RunAndReturn(run func(n *Node, timeout time.Duration) error) *MockNodeClient_WaitReady_Call
type Node ¶
type Node struct {
FileIO util.FileIO `json:"-"`
// If connecting via the Jumpbox
Jumpbox *Node `json:"-"`
Name string `json:"name"`
ExternalIP string `json:"external_ip"`
InternalIP string `json:"internal_ip"`
NodeClient NodeClient `json:"-"`
// contains filtered or unexported fields
}
func (*Node) ConfigureAcceptEnv ¶
ConfigureAcceptEnv configures AcceptEnv for OMS_PORTAL_API_KEY
func (*Node) ConfigureInotifyWatches ¶
func (*Node) ConfigureMemoryMap ¶ added in v0.27.0
func (*Node) CreateSubNode ¶ added in v0.32.1
NewNode creates a new Node with the given File CreateSubNode creates a Node object representing a node behind a jumpbox
func (*Node) EnableRootLogin ¶
EnableRootLogin enables root login on the remote node via SSH
func (*Node) GetExternalIP ¶ added in v0.32.1
GetExternalIP returns the external IP of the node
func (*Node) GetInternalIP ¶ added in v0.32.1
GetInternalIP returns the internal IP of the node
func (*Node) HasAcceptEnvConfigured ¶
HasAcceptEnvConfigured checks if AcceptEnv is configured
func (*Node) HasCommand ¶
HasCommand checks if a command exists on the remote node via SSH
func (*Node) HasInotifyWatchesConfigured ¶
func (*Node) HasMemoryMapConfigured ¶ added in v0.27.0
func (*Node) HasRootLoginEnabled ¶
HasRootLoginEnabled checks if root login is enabled on the remote node via SSH
func (*Node) InstallOms ¶
InstallOms installs the OMS CLI on the remote node via SSH
func (*Node) RunSSHCommand ¶
RunSSHCommand connects to the node, executes a command and streams the output. If quiet is true, command output is not printed to stdout/stderr. The SSH client connection is cached and reused for subsequent commands.
type NodeClient ¶ added in v0.32.1
type SSHNodeClient ¶ added in v0.32.1
type SSHNodeClient struct {
Quiet bool
}
func NewSSHNodeClient ¶ added in v0.32.1
func NewSSHNodeClient(quiet bool) *SSHNodeClient
func (*SSHNodeClient) CopyFile ¶ added in v0.32.1
func (c *SSHNodeClient) CopyFile(n *Node, src string, dst string) error
CopyFile copies a file from the local system to the remote node via SFTP
func (*SSHNodeClient) HasFile ¶ added in v0.32.1
func (c *SSHNodeClient) HasFile(n *Node, filePath string) bool
HasFile checks if a file exists on the remote node via SSH
func (*SSHNodeClient) RunCommand ¶ added in v0.32.1
func (r *SSHNodeClient) RunCommand(n *Node, username string, command string) error