Documentation ¶
Index ¶
- func GetRequestID() int
- func RunCMD(s string) string
- type KubeRunner
- func (r *KubeRunner) CountOfCDS(name, ns string) int
- func (r *KubeRunner) CountOfEDS(name, ns string) int
- func (r *KubeRunner) CreateNamespace(namespace string, inject bool) error
- func (r *KubeRunner) ExecPod(container, podName, namespace, command string) (string, error)
- func (r *KubeRunner) GetAccessLog(container, podName, ns string, since time.Time, match string) (string, error)
- func (r *KubeRunner) GetFirstPodByLabels(namespace, labels string) (*corev1.Pod, error)
- func (r *KubeRunner) GetServiceIP(name, ns string) string
- func (r *KubeRunner) XDSStatistics(name, ns string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KubeRunner ¶
type KubeRunner struct {
// contains filtered or unexported fields
}
KubeRunner represent the command running in the container
func NewKubeRunnerFromENV ¶
func NewKubeRunnerFromENV() (*KubeRunner, error)
NewKubeRunnerFromENV ...
func (*KubeRunner) CountOfCDS ¶
func (r *KubeRunner) CountOfCDS(name, ns string) int
CountOfCDS get cds count of pod
func (*KubeRunner) CountOfEDS ¶
func (r *KubeRunner) CountOfEDS(name, ns string) int
CountOfEDS get eds count of pod
func (*KubeRunner) CreateNamespace ¶
func (r *KubeRunner) CreateNamespace(namespace string, inject bool) error
CreateNamespace creates namespace, with the control of istio-injection label
func (*KubeRunner) ExecPod ¶
func (r *KubeRunner) ExecPod(container, podName, namespace, command string) (string, error)
ExecPod execute the command in the specified pod
func (*KubeRunner) GetAccessLog ¶
func (r *KubeRunner) GetAccessLog(container, podName, ns string, since time.Time, match string) (string, error)
GetAccessLog get the access log of container
func (*KubeRunner) GetFirstPodByLabels ¶
func (r *KubeRunner) GetFirstPodByLabels(namespace, labels string) (*corev1.Pod, error)
GetFirstPodByLabels get the first pod by labels
func (*KubeRunner) GetServiceIP ¶
func (r *KubeRunner) GetServiceIP(name, ns string) string
GetServiceIP get service ip by service name and namespace
func (*KubeRunner) XDSStatistics ¶
func (r *KubeRunner) XDSStatistics(name, ns string) string
XDSStatistics get the cds and eds statistics of pod
Click to show internal directories.
Click to hide internal directories.