Documentation
¶
Index ¶
- func FilterEvents(events []corev1.Event, resourceKind, resourceName string, podNames []string) ([]corev1.Event, []corev1.Event)
- func GetClient() (kubernetes.Interface, error)
- func GetDeploymentPods(client kubernetes.Interface, namespace string, deploy *appsv1.Deployment) ([]corev1.Pod, error)
- func ListAllEventsInNamespace(client kubernetes.Interface, namespace string) ([]corev1.Event, error)
- type ContainerLog
- type ResourceData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterEvents ¶
func FilterEvents(events []corev1.Event, resourceKind, resourceName string, podNames []string) ([]corev1.Event, []corev1.Event)
FilterEvents filters events for a given resource kind/name and optional pod names.
func GetClient ¶
func GetClient() (kubernetes.Interface, error)
func GetDeploymentPods ¶
func GetDeploymentPods(client kubernetes.Interface, namespace string, deploy *appsv1.Deployment) ([]corev1.Pod, error)
GetDeploymentPods returns the pods managed by a given deployment.
func ListAllEventsInNamespace ¶
func ListAllEventsInNamespace(client kubernetes.Interface, namespace string) ([]corev1.Event, error)
ListAllEventsInNamespace fetches all events in the given namespace.
Types ¶
type ContainerLog ¶
ContainerLog holds logs for a single container.
func FetchPodLogs ¶
func FetchPodLogs(client kubernetes.Interface, namespace string, pod corev1.Pod) ([]ContainerLog, error)
FetchPodLogs retrieves logs for all containers in a given pod.
type ResourceData ¶
type ResourceData struct { Kind string Obj interface{} }
ResourceData is a simple struct that can hold the retrieved object and its kind.
func FetchResource ¶
func FetchResource(client kubernetes.Interface, namespace, resourceType, resourceName string) (*ResourceData, error)
Click to show internal directories.
Click to hide internal directories.