Documentation ¶
Index ¶
- func Logs(ctx context.Context, client kubernetes.Interface, ...) (output string, err error)
- func NewTransport(logger logr.Logger, client kubernetes.Interface, restConfig *rest.Config) *http.Transport
- func RunInPod(f *framework.Framework, rootdir string, files []string, command string, ...) (string, string)
- type Addr
- type Dialer
- type LocalAddr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Logs ¶ added in v0.9.0
func Logs(ctx context.Context, client kubernetes.Interface, namespace, pod, container string) (output string, err error)
Retrieves a container log, with retry in case of errors. It is okay if the pod does not exist yet.
func NewTransport ¶ added in v1.0.0
func NewTransport(logger logr.Logger, client kubernetes.Interface, restConfig *rest.Config) *http.Transport
NewTransport creates a transport which uses the port forward dialer. URLs must use <namespace>.<pod>:<port> as host.
func RunInPod ¶
func RunInPod(f *framework.Framework, rootdir string, files []string, command string, namespace, pod, container string) (string, string)
RunInPod optionally transfers some files into /tmp (source file relative to root dir, with same base file name, without path, with same x bit) and executes a shell command. Any error is treated as test failure.
Relies on dd in the target container.
Types ¶
type Addr ¶ added in v1.0.0
Addr contains all relevant parameters for a certain port in a pod. The container should be running before connections are attempted, otherwise the connection will fail.
type Dialer ¶ added in v1.0.0
type Dialer struct {
// contains filtered or unexported fields
}
Dialer holds the relevant parameters that are independent of a particular connection.