node

package
v1.45.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockNodeClient added in v0.32.1

type MockNodeClient struct {
	mock.Mock
}

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 (*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

func (*MockNodeClient) WaitReady added in v0.32.1

func (_mock *MockNodeClient) WaitReady(n *Node, timeout time.Duration) error

WaitReady provides a mock function for the type MockNodeClient

type MockNodeClient_CopyFile_Call added in v0.32.1

type MockNodeClient_CopyFile_Call struct {
	*mock.Call
}

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 (*MockNodeClient_CopyFile_Call) Run added in v0.32.1

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

type MockNodeClient_HasFile_Call struct {
	*mock.Call
}

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 (*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

type MockNodeClient_RunCommand_Call struct {
	*mock.Call
}

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 (*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

type MockNodeClient_WaitReady_Call struct {
	*mock.Call
}

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 (*MockNodeClient_WaitReady_Call) Run added in v0.32.1

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

func (n *Node) ConfigureAcceptEnv() error

ConfigureAcceptEnv configures AcceptEnv for OMS_PORTAL_API_KEY

func (*Node) ConfigureInotifyWatches

func (n *Node) ConfigureInotifyWatches() error

func (*Node) ConfigureMemoryMap added in v0.27.0

func (n *Node) ConfigureMemoryMap() error

func (*Node) CreateSubNode added in v0.32.1

func (n *Node) CreateSubNode(name string, externalIP string, internalIP string) *Node

NewNode creates a new Node with the given File CreateSubNode creates a Node object representing a node behind a jumpbox

func (*Node) EnableRootLogin

func (n *Node) EnableRootLogin() error

EnableRootLogin enables root login on the remote node via SSH

func (*Node) GetExternalIP added in v0.32.1

func (n *Node) GetExternalIP() string

GetExternalIP returns the external IP of the node

func (*Node) GetInternalIP added in v0.32.1

func (n *Node) GetInternalIP() string

GetInternalIP returns the internal IP of the node

func (*Node) GetName added in v0.32.1

func (n *Node) GetName() string

GetName returns the name of the node

func (*Node) HasAcceptEnvConfigured

func (n *Node) HasAcceptEnvConfigured() bool

HasAcceptEnvConfigured checks if AcceptEnv is configured

func (*Node) HasCommand

func (n *Node) HasCommand(command string) bool

HasCommand checks if a command exists on the remote node via SSH

func (*Node) HasInotifyWatchesConfigured

func (n *Node) HasInotifyWatchesConfigured() bool

func (*Node) HasMemoryMapConfigured added in v0.27.0

func (n *Node) HasMemoryMapConfigured() bool

func (*Node) HasRootLoginEnabled

func (n *Node) HasRootLoginEnabled() bool

HasRootLoginEnabled checks if root login is enabled on the remote node via SSH

func (*Node) InstallOms

func (n *Node) InstallOms() error

InstallOms installs the OMS CLI on the remote node via SSH

func (*Node) RunSSHCommand

func (n *Node) RunSSHCommand(username string, command string) error

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.

func (*Node) UpdateNode added in v0.32.1

func (n *Node) UpdateNode(name string, externalIP string, internalIP string)

UpdateNode updates the node's name and IP addresses

type NodeClient added in v0.32.1

type NodeClient interface {
	RunCommand(n *Node, username string, command string) error
	CopyFile(n *Node, src string, dst string) error
	WaitReady(n *Node, timeout time.Duration) error
	HasFile(n *Node, filePath string) bool
}

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

func (*SSHNodeClient) WaitReady added in v0.32.1

func (c *SSHNodeClient) WaitReady(node *Node, timeout time.Duration) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL