Documentation
¶
Index ¶
- Variables
- func ContextFromStopChannel(stopCh <-chan struct{}) context.Context
- func DebugExec(ctx context.Context, config *rest.Config, options executor.DebugExecOptions) error
- func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)
- func GetPodReadyCondition(status corev1.PodStatus) *corev1.PodCondition
- func GetPodsByLabels(ctx context.Context, c client.Client, labelsMap labels.Selector, ...) (*corev1.PodList, error)
- func IsPodReady(pod *corev1.Pod) bool
- func IsPodReadyConditionTrue(status corev1.PodStatus) bool
- func LeaderElectionNameID(name string) string
- func LogErrAndExit(err error, msg string, keysAndValues ...interface{})
- func ParseNetcatOutput(out string, nc *Netcat)
- func ParsePingOutput(outs []byte, ping *Ping)
- func ParseQperfOutput(outs []byte, qperf *Qperf, protocol networkmachineryv1alpha1.Protocol)
- func PodExec(ctx context.Context, config *rest.Config, options executor.PodExecOptions) error
- func ReadIn(reader io.Reader, p []byte) error
- func SetupSignalHandlerContext() context.Context
- func ShouldUseEphemeralContainers(config *rest.Config) (bool, error)
- type Netcat
- type Ping
- type Qperf
Constants ¶
This section is empty.
Variables ¶
var Kubernetes116 = semver.New("1.16.0")
Functions ¶
func ContextFromStopChannel ¶
ContextFromStopChannel creates a new context from a given stop channel.
func GetPodCondition ¶
func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)
GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.
func GetPodReadyCondition ¶
func GetPodReadyCondition(status corev1.PodStatus) *corev1.PodCondition
GetPodReadyCondition extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.
func GetPodsByLabels ¶
func IsPodReady ¶
IsPodReady returns true if a pod is ready; false otherwise.
func IsPodReadyConditionTrue ¶
IsPodReadyConditionTrue returns true if a pod is ready; false otherwise.
func LeaderElectionNameID ¶
LeaderElectionNameID returns a leader election ID for the given name.
func LogErrAndExit ¶
LogErrAndExit logs the given error with msg and keysAndValues and calls `os.Exit(1)`.
func ParseNetcatOutput ¶
func ParsePingOutput ¶
func ParseQperfOutput ¶
func ParseQperfOutput(outs []byte, qperf *Qperf, protocol networkmachineryv1alpha1.Protocol)
func SetupSignalHandlerContext ¶
SetupSignalHandlerContext sets up a context from signals.SetupSignalHandler stop channel.
Types ¶
type Netcat ¶
type Netcat struct {
// contains filtered or unexported fields
}
func (*Netcat) State ¶
func (n *Netcat) State() v1alpha1.NetcatResultState