Documentation
¶
Index ¶
- Constants
- func Retry(f retryable) (output string, err error)
- func RetryWithErrorCheck(ec errorchecker, f retryable) (output string, err error)
- func RetryWithTimeout(f retryable, timeoutMsg error) (output string, err error)
- type CommandBuilder
- type ContainerFilter
- type ContainerLogs
- type ContainerStat
- type ExecOptions
- type Executor
- type K8sExecutor
- func (e *K8sExecutor) CapturePodConfiguration(testName, ns, podName string) error
- func (e *K8sExecutor) ClientSet() *kubernetes.Clientset
- func (e *K8sExecutor) CreateConfigMap(ns string, configMap *coreV1.ConfigMap) (*coreV1.ConfigMap, error)
- func (e *K8sExecutor) CreateNamespace(ns string) (*coreV1.Namespace, error)
- func (e *K8sExecutor) CreateNamespaceEventWatcher(testName, ns string) (watch.Interface, error)
- func (e *K8sExecutor) CreatePod(ns string, pod *coreV1.Pod) (*coreV1.Pod, error)
- func (e *K8sExecutor) ExitCode(podFilter ContainerFilter) (int, error)
- func (e *K8sExecutor) IsPodRunning(podName string) (bool, error)
- func (e *K8sExecutor) NamespaceExists(ns string) (bool, error)
- func (e *K8sExecutor) PodContainerID(podFilter ContainerFilter) string
- func (e *K8sExecutor) PodExists(podFilter ContainerFilter) (bool, error)
- func (e *K8sExecutor) PodIP(ns, name string) (string, error)
- func (e *K8sExecutor) RemoveConfigMap(ns, name string) error
- func (e *K8sExecutor) RemoveNamespace(ns string) error
- func (e *K8sExecutor) RemovePod(podFilter ContainerFilter) (string, error)
- func (e *K8sExecutor) UpdateConfigMap(ns string, configMap *coreV1.ConfigMap) (*coreV1.ConfigMap, error)
- func (e *K8sExecutor) WaitPodRemoved(podFilter ContainerFilter) error
Constants ¶
View Source
const (
NoOutput = ""
)
View Source
const (
TESTS_NAMESPACE = "collector-tests"
)
Variables ¶
This section is empty.
Functions ¶
func RetryWithErrorCheck ¶
Simple retry with error checker
func RetryWithTimeout ¶
Retry based on a ticker with timeout.
Note that the caller is responsible for reporting outstanding errors in ticker function
Types ¶
type CommandBuilder ¶
type ContainerFilter ¶
type ContainerLogs ¶
func (*ContainerLogs) Empty ¶
func (c *ContainerLogs) Empty() bool
func (*ContainerLogs) GetSingleLog ¶
func (l *ContainerLogs) GetSingleLog() string
Will return Stderr if it is not empty, otherwise it returns Stdout. Useful for accessing the logs for collector and container-stats that use a single stream.
type ContainerStat ¶
type ExecOptions ¶
type Executor ¶
type Executor interface {
PullImage(image string) error
IsContainerRunning(container string) (bool, error)
ContainerExists(filter ContainerFilter) (bool, error)
ExitCode(filter ContainerFilter) (int, error)
ExecContainer(opts *ExecOptions) (string, error)
KillContainer(name string) (string, error)
RemoveContainer(filter ContainerFilter) (string, error)
StopContainer(name string) (string, error)
StartContainer(config config.ContainerStartConfig) (string, error)
GetContainerHealthCheck(containerID string) (string, error)
GetContainerStats(ctx context.Context, containerID string) (*ContainerStat, error)
GetContainerIP(containerID string) (string, error)
GetContainerLogs(containerID string) (ContainerLogs, error)
CaptureLogs(testName, containerName string) (string, error)
GetContainerPorts(containerID string) ([]string, error)
IsContainerFoundFiltered(containerID, filter string) (bool, error)
}
type K8sExecutor ¶
type K8sExecutor struct {
// contains filtered or unexported fields
}
func NewK8sExecutor ¶
func NewK8sExecutor() (*K8sExecutor, error)
func (*K8sExecutor) CapturePodConfiguration ¶
func (e *K8sExecutor) CapturePodConfiguration(testName, ns, podName string) error
func (*K8sExecutor) ClientSet ¶
func (e *K8sExecutor) ClientSet() *kubernetes.Clientset
func (*K8sExecutor) CreateConfigMap ¶
func (*K8sExecutor) CreateNamespace ¶
func (e *K8sExecutor) CreateNamespace(ns string) (*coreV1.Namespace, error)
func (*K8sExecutor) CreateNamespaceEventWatcher ¶
func (e *K8sExecutor) CreateNamespaceEventWatcher(testName, ns string) (watch.Interface, error)
func (*K8sExecutor) ExitCode ¶
func (e *K8sExecutor) ExitCode(podFilter ContainerFilter) (int, error)
func (*K8sExecutor) IsPodRunning ¶
func (e *K8sExecutor) IsPodRunning(podName string) (bool, error)
func (*K8sExecutor) NamespaceExists ¶
func (e *K8sExecutor) NamespaceExists(ns string) (bool, error)
func (*K8sExecutor) PodContainerID ¶
func (e *K8sExecutor) PodContainerID(podFilter ContainerFilter) string
func (*K8sExecutor) PodExists ¶
func (e *K8sExecutor) PodExists(podFilter ContainerFilter) (bool, error)
func (*K8sExecutor) RemoveConfigMap ¶
func (e *K8sExecutor) RemoveConfigMap(ns, name string) error
func (*K8sExecutor) RemoveNamespace ¶
func (e *K8sExecutor) RemoveNamespace(ns string) error
func (*K8sExecutor) RemovePod ¶
func (e *K8sExecutor) RemovePod(podFilter ContainerFilter) (string, error)
func (*K8sExecutor) UpdateConfigMap ¶
func (*K8sExecutor) WaitPodRemoved ¶
func (e *K8sExecutor) WaitPodRemoved(podFilter ContainerFilter) error
Click to show internal directories.
Click to hide internal directories.