Documentation ¶
Overview ¶
Package components contains the definitions of the different components that can be used in a test.
Index ¶
- type DockerAgent
- type EnvVar
- type ExecuteOption
- type ExecuteParams
- type FakeIntake
- type KubernetesAgent
- type KubernetesCluster
- type RemoteActiveDirectory
- type RemoteHost
- func (h *RemoteHost) AppendFile(os, path string, content []byte) (int64, error)
- func (h *RemoteHost) CopyFile(src string, dst string)
- func (h *RemoteHost) CopyFolder(srcFolder string, dstFolder string)
- func (h *RemoteHost) DialRemotePort(port uint16) (net.Conn, error)
- func (h *RemoteHost) Execute(command string, options ...ExecuteOption) (string, error)
- func (h *RemoteHost) FileExists(path string) (bool, error)
- func (h *RemoteHost) GetFile(src string, dst string) error
- func (h *RemoteHost) Init(ctx e2e.Context) error
- func (h *RemoteHost) Lstat(path string) (fs.FileInfo, error)
- func (h *RemoteHost) MkdirAll(path string) error
- func (h *RemoteHost) MustExecute(command string, options ...ExecuteOption) string
- func (h *RemoteHost) ReadDir(path string) ([]fs.DirEntry, error)
- func (h *RemoteHost) ReadFile(path string) ([]byte, error)
- func (h *RemoteHost) ReconnectSSH() error
- func (h *RemoteHost) Remove(path string) error
- func (h *RemoteHost) RemoveAll(path string) error
- func (h *RemoteHost) WriteFile(path string, content []byte) (int64, error)
- type RemoteHostAgent
- type RemoteHostUpdater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerAgent ¶
type DockerAgent struct { agent.DockerAgentOutput // Client cannot be initialized inline as it requires other information to create client Client agentclient.Agent }
DockerAgent represents an Agent running in a Docker container
type ExecuteOption ¶
type ExecuteOption func(*ExecuteParams) error
ExecuteOption alias to a functional option changing a given Params instance
func WithEnvVariables ¶
func WithEnvVariables(env EnvVar) ExecuteOption
WithEnvVariables allows to set env variable for the command that will be executed
type ExecuteParams ¶
type ExecuteParams struct {
EnvVariables EnvVar
}
ExecuteParams contains parameters for VM.Execute commands
type FakeIntake ¶
type FakeIntake struct { fakeintake.FakeintakeOutput // contains filtered or unexported fields }
FakeIntake represents a FakeIntake instance
func (*FakeIntake) Client ¶
func (fi *FakeIntake) Client() *client.Client
Client returns the FakeIntake client
type KubernetesAgent ¶ added in v0.53.0
type KubernetesAgent struct {
agent.KubernetesAgentOutput
}
KubernetesAgent is an agent running in a Kubernetes cluster
type KubernetesCluster ¶
type KubernetesCluster struct { kubernetes.ClusterOutput // contains filtered or unexported fields }
KubernetesCluster represents a Kubernetes cluster
func (*KubernetesCluster) Client ¶
func (kc *KubernetesCluster) Client() kubeClient.Interface
Client returns the Kubernetes client
type RemoteActiveDirectory ¶ added in v0.53.0
type RemoteActiveDirectory struct {
activedirectory.Output
}
RemoteActiveDirectory represents an Active Directory domain on a remote machine
type RemoteHost ¶
type RemoteHost struct { remote.HostOutput // contains filtered or unexported fields }
RemoteHost represents a remote host
func (*RemoteHost) AppendFile ¶ added in v0.52.0
func (h *RemoteHost) AppendFile(os, path string, content []byte) (int64, error)
AppendFile append content to the file and returns the number of bytes written and error if any
func (*RemoteHost) CopyFile ¶
func (h *RemoteHost) CopyFile(src string, dst string)
CopyFile copy file to the remote host
func (*RemoteHost) CopyFolder ¶
func (h *RemoteHost) CopyFolder(srcFolder string, dstFolder string)
CopyFolder copy a folder to the remote host
func (*RemoteHost) DialRemotePort ¶ added in v0.52.0
func (h *RemoteHost) DialRemotePort(port uint16) (net.Conn, error)
DialRemotePort creates a connection to port on the remote host.
func (*RemoteHost) Execute ¶
func (h *RemoteHost) Execute(command string, options ...ExecuteOption) (string, error)
Execute executes a command and returns an error if any.
func (*RemoteHost) FileExists ¶
func (h *RemoteHost) FileExists(path string) (bool, error)
FileExists returns true if the file exists and is a regular file and returns an error if any
func (*RemoteHost) GetFile ¶
func (h *RemoteHost) GetFile(src string, dst string) error
GetFile copy file from the remote host
func (*RemoteHost) Init ¶
func (h *RemoteHost) Init(ctx e2e.Context) error
Init is called by e2e test Suite after the component is provisioned.
func (*RemoteHost) Lstat ¶
func (h *RemoteHost) Lstat(path string) (fs.FileInfo, error)
Lstat returns a FileInfo structure describing path. if path is a symbolic link, the FileInfo structure describes the symbolic link.
func (*RemoteHost) MkdirAll ¶
func (h *RemoteHost) MkdirAll(path string) error
MkdirAll creates the specified directory along with any necessary parents. If the path is already a directory, does nothing and returns nil. Otherwise returns an error if any.
func (*RemoteHost) MustExecute ¶
func (h *RemoteHost) MustExecute(command string, options ...ExecuteOption) string
MustExecute executes a command and returns its output.
func (*RemoteHost) ReadDir ¶
func (h *RemoteHost) ReadDir(path string) ([]fs.DirEntry, error)
ReadDir returns list of directory entries in path
func (*RemoteHost) ReadFile ¶
func (h *RemoteHost) ReadFile(path string) ([]byte, error)
ReadFile reads the content of the file, return bytes read and error if any
func (*RemoteHost) ReconnectSSH ¶
func (h *RemoteHost) ReconnectSSH() error
ReconnectSSH recreate the SSH connection to the VM. Should be used only after VM reboot to restore the SSH connection. Returns an error if the VM is not reachable after retries.
func (*RemoteHost) Remove ¶
func (h *RemoteHost) Remove(path string) error
Remove removes the specified file or directory. Returns an error if file or directory does not exist, or if the directory is not empty.
func (*RemoteHost) RemoveAll ¶
func (h *RemoteHost) RemoveAll(path string) error
RemoveAll recursively removes all files/folders in the specified directory. Returns an error if the directory does not exist.
type RemoteHostAgent ¶
type RemoteHostAgent struct { agent.HostAgentOutput // Client cannot be initialized inline as it requires other information to create client Client agentclient.Agent }
RemoteHostAgent represents an Agent running directly on a Host
type RemoteHostUpdater ¶ added in v0.53.0
type RemoteHostUpdater struct {
updater.HostUpdaterOutput
}
RemoteHostUpdater represents an Updater running directly on a Host