k8s

package
v0.0.0-...-599ae38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sEventDataRef

type K8sEventDataRef struct {
	K8sEventRetriever
	observability.EventFilterCriteria
}

func (K8sEventDataRef) GetEvents

func (dataRef K8sEventDataRef) GetEvents(ctx context.Context) ([]observability.EventRecord, error)

This function will call the k8s API to retrieve the events. Use predefined filtering conditions. In FilterCriteria, if namespace is provided, will get Events only under the specified namespace, otherwise get events of all the namespaces. In FilterCriteria, if resource name is provided, will do filtering after retrieving all the events, if the resource name can be found in event.Message or event.InvolvedObject.Name. In FilterCriteria, StartTime and EndTime won't be used for filtering.

type K8sEventRetriever

type K8sEventRetriever struct {
	// contains filtered or unexported fields
}

func NewK8sEventRetriever

func NewK8sEventRetriever(kubeclient *kubeclient.KubeClient) K8sEventRetriever

New for K8sEventRetriever.

func (K8sEventRetriever) AddFilters

func (eventReceiver K8sEventRetriever) AddFilters(name string, namespace string) map[string]string

Default filter, add k8s resource Name and Namespace.

func (K8sEventRetriever) Retrieve

func (eventReceiver K8sEventRetriever) Retrieve(filterCriteria observability.EventFilterCriteria) observability.EventDataRef

Return the instance of EventDataRef, with k8sClient, and filtering conditions set.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL