client

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sClient

type K8sClient struct {
	// contains filtered or unexported fields
}

func NewK8sClient

func NewK8sClient() (*K8sClient, error)

NewK8sClient return s Kubernetes client that contains the following - cs: general k8s client - aaclient: specific client to manage AppArmorProfile CRD object - extclient: extension client to manage CRD

func (*K8sClient) GetAppArmorProfiles

func (c *K8sClient) GetAppArmorProfiles() ([]types.AppArmorProfile, error)

GetAppArmorProfiles returns apparmor profiles from etcd

func (*K8sClient) GetNodes

func (c *K8sClient) GetNodes() (types.NodeList, error)

GetNodes returns node list

func (*K8sClient) InstallCRD

func (c *K8sClient) InstallCRD() error

InstallCRD installs AppArmorProfile CRD

func (*K8sClient) RemoveCRD

func (c *K8sClient) RemoveCRD() error

RemoveCRD removes AppArmorProfile CRD

type SSHClient

type SSHClient struct {
	// contains filtered or unexported fields
}

func NewSSHClientConfig

func NewSSHClientConfig(user, keyFile, passworkPhrase string) (*SSHClient, error)

NewSSHClientConfig returns client configuration for SSH client

func (*SSHClient) Close

func (c *SSHClient) Close() error

Close close the client connection

func (*SSHClient) Connect

func (c *SSHClient) Connect(host, port string) error

Connect connects to a node

func (*SSHClient) ExecuteBatch

func (c *SSHClient) ExecuteBatch(commands []string, prependSudo bool) error

ExecuteBatch execute bach commands

func (*SSHClient) ExecuteOne

func (c *SSHClient) ExecuteOne(cmd string, prependSudo bool) (stdout, stderr string, err error)

ExecuteOne executes one command

Jump to

Keyboard shortcuts

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