Documentation ¶
Index ¶
- func CreateSnapshot() (*portainer.KubernetesSnapshot, error)
- type KubeClient
- func (kcl *KubeClient) GetDaemonSetStatus(namespace string, name string) ResourceStatus
- func (kcl *KubeClient) GetDeploymentStatus(namespace string, name string) ResourceStatus
- func (kcl *KubeClient) GetPodStatus(namespace string, name string) ResourceStatus
- func (kcl *KubeClient) GetStatefulSetStatus(namespace string, name string) ResourceStatus
- func (kcl *KubeClient) StartExecProcess(token, namespace, podName, containerName string, command []string, ...) error
- type ResourceStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSnapshot ¶
func CreateSnapshot() (*portainer.KubernetesSnapshot, error)
CreateSnapshot creates a snapshot of a specific Kubernetes environment(endpoint)
Types ¶
type KubeClient ¶
type KubeClient struct {
// contains filtered or unexported fields
}
KubeClient can be used to query the Kubernetes API
func NewKubeClient ¶
func NewKubeClient() (*KubeClient, error)
NewKubeClient returns a pointer to a new KubeClient instance
func (*KubeClient) GetDaemonSetStatus ¶
func (kcl *KubeClient) GetDaemonSetStatus(namespace string, name string) ResourceStatus
func (*KubeClient) GetDeploymentStatus ¶
func (kcl *KubeClient) GetDeploymentStatus(namespace string, name string) ResourceStatus
func (*KubeClient) GetPodStatus ¶
func (kcl *KubeClient) GetPodStatus(namespace string, name string) ResourceStatus
func (*KubeClient) GetStatefulSetStatus ¶
func (kcl *KubeClient) GetStatefulSetStatus(namespace string, name string) ResourceStatus
func (*KubeClient) StartExecProcess ¶
func (kcl *KubeClient) StartExecProcess(token, namespace, podName, containerName string, command []string, stdin io.Reader, stdout io.Writer) error
StartExecProcess will start an exec process inside a container located inside a pod inside a specific namespace using the specified command. The stdin parameter will be bound to the stdin process and the stdout process will write to the stdout parameter. This function only works against a local endpoint using an in-cluster config.
type ResourceStatus ¶
func AggregateStatuses ¶
func AggregateStatuses(statuses []ResourceStatus) ResourceStatus
Click to show internal directories.
Click to hide internal directories.