Documentation ¶
Index ¶
- Constants
- func DetectDestinationObject(ctx context.Context, k8s K8sClient, trace *pluginsmodels.Telemetry) (runtime.Object, error)
- func DetectSourceObject(ctx context.Context, k8s K8sClient, trace *pluginsmodels.Telemetry) (runtime.Object, error)
- func ParseAddr(addr string) (ip, port string)
- type AppEnvInfo
- type K8SAnnotatedK8STelemetry
- type K8sClient
- type K8sObjectRef
Constants ¶
View Source
const ResyncPeriod = 1 * time.Minute
Variables ¶
This section is empty.
Functions ¶
func DetectDestinationObject ¶
func DetectSourceObject ¶
Types ¶
type AppEnvInfo ¶
type AppEnvInfo struct { Address string Namespace string K8SObject *K8sObjectRef }
type K8SAnnotatedK8STelemetry ¶
type K8SAnnotatedK8STelemetry struct { RequestID string Scheme string Destination *AppEnvInfo Source *AppEnvInfo Request *pluginsmodels.Request Response *pluginsmodels.Response }
func NewK8SAnnotatedK8STelemetry ¶
func NewK8SAnnotatedK8STelemetry(trace *pluginsmodels.Telemetry, src, dest runtime.Object) *K8SAnnotatedK8STelemetry
type K8sClient ¶
type K8sClient interface { ServicesGet(namespace, name string) (*corev1.Service, error) ServicesList(namespace string) ([]*corev1.Service, error) PodsList(namespace string) ([]*corev1.Pod, error) GetObject(ctx context.Context, apiVersion, kind, namespace, name string) (runtime.Object, error) GetObjectOwnerRecursively(ctx context.Context, namespace string, refs []metav1.OwnerReference) (runtime.Object, error) }
func NewK8sClient ¶
func NewK8sClient(clientset kubernetes.Interface) (K8sClient, error)
type K8sObjectRef ¶
type K8sObjectRef struct { // nolint:revive,stylecheck ApiVersion string `json:"apiVersion,omitempty"` Kind string `json:"kind,omitempty"` Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` // nolint:revive,stylecheck Uid string `json:"uid,omitempty"` }
func NewRef ¶
func NewRef(obj runtime.Object) *K8sObjectRef
Click to show internal directories.
Click to hide internal directories.