client

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapInfo

type ConfigMapInfo struct {
	Name      string
	Namespace string
	Data      int32
	CreatedAt time.Time
}

type DeploymentInfo

type DeploymentInfo struct {
	Name            string
	Namespace       string
	Available       int32
	ReadyReplicas   int32
	Replicas        int32
	UpdatedReplicas int32
	CreatedAt       time.Time
}

type JobInfo

type JobInfo struct {
	Name        string
	Namespace   string
	Active      int32
	Succeeded   int32
	Failed      int32
	Age         string
	CompletedAt time.Time
	CreatedAt   time.Time
}

type K8s

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

func Newk8s

func Newk8s() (*K8s, error)

func (*K8s) DescribeConfigMap added in v0.1.1

func (k *K8s) DescribeConfigMap(ns string, configMapName string) (*v1Core.ConfigMap, error)

func (*K8s) DescribeDeployment added in v0.1.1

func (k *K8s) DescribeDeployment(ns string, deploymentname string) (*v1Apps.Deployment, error)

func (*K8s) DescribeJob added in v0.1.1

func (k *K8s) DescribeJob(ns string, jobname string) (*v1Batch.Job, error)

func (*K8s) DescribePod added in v0.1.1

func (k *K8s) DescribePod(ns string, podname string) (*v1Core.Pod, error)

func (*K8s) DescribeSecret added in v0.1.1

func (k *K8s) DescribeSecret(ns string, secretName string) (*v1Core.Secret, error)

func (*K8s) DescribeService added in v0.1.1

func (k *K8s) DescribeService(ns string, servicename string) (*v1Core.Service, error)

func (*K8s) GetNamespace added in v0.1.1

func (k *K8s) GetNamespace(ns string) (*v1Core.Namespace, error)

func (*K8s) GetServerInfo added in v0.1.1

func (k *K8s) GetServerInfo() (*version.Info, error)

func (*K8s) ListConfigMap

func (k *K8s) ListConfigMap(namespace string) ([]ConfigMapInfo, error)

func (*K8s) ListDeployments

func (k *K8s) ListDeployments(namespace string) ([]DeploymentInfo, error)

func (*K8s) ListJobs

func (k *K8s) ListJobs(namespace string) ([]JobInfo, error)

func (*K8s) ListNamespace

func (k *K8s) ListNamespace() ([]NamespaceInfo, error)

func (*K8s) ListNode

func (k *K8s) ListNode() ([]NodeInfo, error)

func (*K8s) ListPods

func (k *K8s) ListPods(namespace string) ([]PodInfo, error)

func (*K8s) ListSecrets

func (k *K8s) ListSecrets(namespace string) ([]SecretInfo, error)

func (*K8s) ListServices added in v0.1.1

func (k *K8s) ListServices(namespace string) ([]ServiceInfo, error)

func (*K8s) ListStatefulsets

func (k *K8s) ListStatefulsets(namespace string) ([]StatefulsetInfo, error)

func (*K8s) StreamPodLogs added in v0.1.1

func (k *K8s) StreamPodLogs(ns string, podname string) *restclient.Request

func (*K8s) WatchNamespace added in v0.1.1

func (k *K8s) WatchNamespace() (watch.Interface, error)

TODO: Verify timeout and handle it

func (*K8s) WatchNodes added in v0.1.1

func (k *K8s) WatchNodes() (watch.Interface, error)

func (*K8s) WatchPods added in v0.1.1

func (k *K8s) WatchPods(namespace string) (watch.Interface, error)

type NamespaceInfo

type NamespaceInfo struct {
	Name      string
	Status    string
	CreatedAt time.Time
}

type NodeInfo

type NodeInfo struct {
	Name      string
	Status    string
	Version   string
	CreatedAt time.Time
}

type PodInfo

type PodInfo struct {
	Name            string
	Namespace       string
	Status          string
	ReadyContainers int32
	TotalContainers int32
	Restarts        int32
	CreatedAt       time.Time
}

type SecretInfo

type SecretInfo struct {
	Name      string
	Namespace string
	Type      string
	Data      int32
	CreatedAt time.Time
}

type ServiceInfo added in v0.1.1

type ServiceInfo struct {
	Name       string
	Namespace  string
	Type       string
	ClusterIP  string
	ExternalIP string
	Ports      []ServiceInfoPort
	CreatedAt  time.Time
}

type ServiceInfoPort added in v0.1.1

type ServiceInfoPort struct {
	Name       string
	Protocol   string
	Port       int32
	TargetPort int32
}

type StatefulsetInfo

type StatefulsetInfo struct {
	Name            string
	Namespace       string
	CurrentReplicas int32
	ReadyReplicas   int32
	Replicas        int32
	UpdatedReplicas int32
	CreatedAt       time.Time
}

Jump to

Keyboard shortcuts

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