client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Kubernetes    kubernetespkg.Interface
	APIExtensions apiextensionspkg.Interface
	Candice       candicepkg.Interface
	REST          restpkg.Interface
	CertManager   certmanagerpkg.Interface
	Config        *restpkg.Config
	Context       contextpkg.Context

	ClusterMode            bool
	ClusterRole            string
	Namespace              string
	NamePrefix             string
	PartOf                 string
	ManagedBy              string
	OperatorImageReference string

	LogName string
	Log     *logging.Logger
}

func NewClient

func NewClient(kubernetes kubernetespkg.Interface, apiExtensions apiextensionspkg.Interface, candice candicepkg.Interface, rest restpkg.Interface, config *restpkg.Config, context contextpkg.Context, clusterMode bool, clusterRole string, namespace string, namePrefix string, partOf string, managedBy string, operatorImageReference string, logName string) *Client

func (*Client) CreateCertificate

func (self *Client) CreateCertificate(certificate *certmanager.Certificate) (*certmanager.Certificate, error)

func (*Client) CreateCertificateIssuer

func (self *Client) CreateCertificateIssuer(issuer *certmanager.Issuer) (*certmanager.Issuer, error)

func (*Client) CreateClusterRoleBinding

func (self *Client) CreateClusterRoleBinding(clusterRoleBinding *rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error)

func (*Client) CreateCustomResourceDefinition

func (self *Client) CreateCustomResourceDefinition(customResourceDefinition *apiextensions.CustomResourceDefinition) (*apiextensions.CustomResourceDefinition, error)

func (*Client) CreateDeployment

func (self *Client) CreateDeployment(deployment *apps.Deployment) (*apps.Deployment, error)

func (*Client) CreateDeviceDirect

func (self *Client) CreateDeviceDirect(namespace string, deviceName string, host string) (*resources.Device, error)

func (*Client) CreateDeviceIndirect

func (self *Client) CreateDeviceIndirect(namespace string, deviceName string, serviceNamespace string, serviceName string, port uint64) (*resources.Device, error)

func (*Client) CreateNamespace

func (self *Client) CreateNamespace(namespace *core.Namespace) (*core.Namespace, error)

func (*Client) CreatePod

func (self *Client) CreatePod(pod *core.Pod) (*core.Pod, error)

func (*Client) CreateRole

func (self *Client) CreateRole(role *rbac.Role) (*rbac.Role, error)

func (*Client) CreateRoleBinding

func (self *Client) CreateRoleBinding(roleBinding *rbac.RoleBinding) (*rbac.RoleBinding, error)

func (*Client) CreateService

func (self *Client) CreateService(service *core.Service) (*core.Service, error)

func (*Client) CreateServiceAccount

func (self *Client) CreateServiceAccount(serviceAccount *core.ServiceAccount) (*core.ServiceAccount, error)

func (*Client) DeleteDevice

func (self *Client) DeleteDevice(namespace string, deviceName string) error

func (*Client) DeleteTask

func (self *Client) DeleteTask(namespace string, componentName string, taskName string) error

func (*Client) Exec

func (self *Client) Exec(namespace string, podName string, containerName string, stdin io.Reader, stdout io.Writer, command ...string) error

func (*Client) GetCertManager

func (self *Client) GetCertManager() error

func (*Client) GetDevice

func (self *Client) GetDevice(namespace string, deviceName string) (*resources.Device, error)

func (*Client) GetOperatorServiceAccount

func (self *Client) GetOperatorServiceAccount() (*core.ServiceAccount, error)

func (*Client) GetSourceRegistryHost

func (self *Client) GetSourceRegistryHost(registryHost string) (string, error)

func (*Client) GetTask

func (self *Client) GetTask(namespace string, componentName string, taskName string) (string, error)

func (*Client) InstallOperator

func (self *Client) InstallOperator(sourceRegistryHost string, wait bool) error

func (*Client) Labels

func (self *Client) Labels(appName string, component string, namespace string) map[string]string

func (*Client) ListDevices

func (self *Client) ListDevices() (*resources.DeviceList, error)

func (*Client) ListTasks

func (self *Client) ListTasks(namespace string, componentName string) ([]string, error)

func (*Client) ReadFromContainer

func (self *Client) ReadFromContainer(namespace string, podName string, containerName string, writer io.Writer, sourcePath string) error

func (*Client) RunTask

func (self *Client) RunTask(namespace string, componentName string, taskName string, input ard.Value) (ard.Value, error)

func (*Client) SetTask

func (self *Client) SetTask(namespace string, componentName string, taskName string, content string) error

func (*Client) UninstallOperator

func (self *Client) UninstallOperator(wait bool)

func (*Client) UpdateDeviceStatus

func (self *Client) UpdateDeviceStatus(device *resources.Device) (*resources.Device, error)

func (*Client) VolumeSource

func (self *Client) VolumeSource(size string) core.VolumeSource

func (*Client) WriteToContainer

func (self *Client) WriteToContainer(namespace string, podName string, containerName string, reader io.Reader, targetPath string, permissions *int64) error

Jump to

Keyboard shortcuts

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