Documentation ¶
Index ¶
- func GetFirstPod(client coreclient.PodsGetter, namespace string, selector string, ...) (*corev1.Pod, int, error)
- func SelectorsForObject(object runtime.Object) (namespace string, selector labels.Selector, err error)
- type AttachablePodForObjectFunc
- type CanBeExposedFunc
- type HistoryViewerFunc
- type LogsForObjectFunc
- type MapBasedSelectorForObjectFunc
- type ObjectPauserFunc
- type ObjectRestarterFunc
- type ObjectResumerFunc
- type PortsForObjectFunc
- type ProtocolsForObjectFunc
- type RollbackerFunc
- type StatusViewerFunc
- type UpdatePodSpecForObjectFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFirstPod ¶
func GetFirstPod(client coreclient.PodsGetter, namespace string, selector string, timeout time.Duration, sortBy func([]*corev1.Pod) sort.Interface) (*corev1.Pod, int, error)
GetFirstPod returns a pod matching the namespace and label selector and the number of all pods that match the label selector.
Types ¶
type AttachablePodForObjectFunc ¶ added in v1.14.0
type AttachablePodForObjectFunc func(restClientGetter genericclioptions.RESTClientGetter, object runtime.Object, timeout time.Duration) (*v1.Pod, error)
AttachablePodForObjectFunc is a function type that can tell you how to get the pod for which to attach a given object
var AttachablePodForObjectFn AttachablePodForObjectFunc = attachablePodForObject
AttachablePodForObjectFn gives a way to easily override the function for unit testing if needed.
type CanBeExposedFunc ¶
CanBeExposedFunc is a function type that can tell you whether a given GroupKind is capable of being exposed
var CanBeExposedFn CanBeExposedFunc = canBeExposed
CanBeExposedFn gives a way to easily override the function for unit testing if needed
type HistoryViewerFunc ¶
type HistoryViewerFunc func(restClientGetter genericclioptions.RESTClientGetter, mapping *meta.RESTMapping) (kubectl.HistoryViewer, error)
HistoryViewerFunc is a function type that can tell you how to view change history
var HistoryViewerFn HistoryViewerFunc = historyViewer
HistoryViewerFn gives a way to easily override the function for unit testing if needed
type LogsForObjectFunc ¶
type LogsForObjectFunc func(restClientGetter genericclioptions.RESTClientGetter, object, options runtime.Object, timeout time.Duration, allContainers bool) ([]rest.ResponseWrapper, error)
LogsForObjectFunc is a function type that can tell you how to get logs for a runtime.object
var LogsForObjectFn LogsForObjectFunc = logsForObject
LogsForObjectFn gives a way to easily override the function for unit testing if needed.
type MapBasedSelectorForObjectFunc ¶
MapBasedSelectorForObjectFunc will call the provided function on mapping the baesd selector for object, return "" if object is not supported, or return an error.
var MapBasedSelectorForObjectFn MapBasedSelectorForObjectFunc = mapBasedSelectorForObject
MapBasedSelectorForObjectFn gives a way to easily override the function for unit testing if needed
type ObjectPauserFunc ¶
ObjectPauserFunc is a function type that marks the object in a given info as paused.
var ObjectPauserFn ObjectPauserFunc = defaultObjectPauser
ObjectPauserFn gives a way to easily override the function for unit testing if needed. Returns the patched object in bytes and any error that occurred during the encoding or in case the object is already paused.
type ObjectRestarterFunc ¶ added in v1.15.0
ObjectRestarterFunc is a function type that updates an annotation in a deployment to restart it..
var ObjectRestarterFn ObjectRestarterFunc = defaultObjectRestarter
ObjectRestarterFn gives a way to easily override the function for unit testing if needed. Returns the patched object in bytes and any error that occurred during the encoding.
type ObjectResumerFunc ¶
ObjectResumerFunc is a function type that marks the object in a given info as resumed.
var ObjectResumerFn ObjectResumerFunc = defaultObjectResumer
ObjectResumerFn gives a way to easily override the function for unit testing if needed. Returns the patched object in bytes and any error that occurred during the encoding or in case the object is already resumed.
type PortsForObjectFunc ¶
PortsForObjectFunc returns the ports associated with the provided object
var PortsForObjectFn PortsForObjectFunc = portsForObject
PortsForObjectFn gives a way to easily override the function for unit testing if needed
type ProtocolsForObjectFunc ¶
ProtocolsForObjectFunc will call the provided function on the protocols for the object, return nil-map if no protocols for the object, or return an error.
var ProtocolsForObjectFn ProtocolsForObjectFunc = protocolsForObject
ProtocolsForObjectFn gives a way to easily override the function for unit testing if needed
type RollbackerFunc ¶
type RollbackerFunc func(restClientGetter genericclioptions.RESTClientGetter, mapping *meta.RESTMapping) (kubectl.Rollbacker, error)
RollbackerFunc gives a way to change the rollback version of the specified RESTMapping type
var RollbackerFn RollbackerFunc = rollbacker
RollbackerFn gives a way to easily override the function for unit testing if needed
type StatusViewerFunc ¶
type StatusViewerFunc func(mapping *meta.RESTMapping) (kubectl.StatusViewer, error)
StatusViewerFunc is a function type that can tell you how to print rollout status
var StatusViewerFn StatusViewerFunc = statusViewer
StatusViewerFn gives a way to easily override the function for unit testing if needed
type UpdatePodSpecForObjectFunc ¶
UpdatePodSpecForObjectFunc will call the provided function on the pod spec this object supports, return false if no pod spec is supported, or return an error.
var UpdatePodSpecForObjectFn UpdatePodSpecForObjectFunc = updatePodSpecForObject
UpdatePodSpecForObjectFn gives a way to easily override the function for unit testing if needed