detector

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InjectedWorkloadDetector added in v1.1.0

type InjectedWorkloadDetector interface {
	// returns a ref to a mesh if the provided workload will be injected by that mesh
	DetectMeshForWorkload(workload types.Workload, meshes v1sets.MeshSet) *v1.Mesh
}

a workload detector detects injected Mesh workloads

type SidecarDetector

type SidecarDetector interface {
	// returns a ref to a mesh if the provided Pod contains a sidecar
	// pointing at that mesh. returns nil if the
	// DEPRECATED: use InjectedWorkloadDetector instead
	DetectMeshSidecar(pod *corev1.Pod, meshes v1sets.MeshSet) *v1.Mesh
}

a sidecar detector detects injected Mesh sidecars in a Pod

type SidecarDetectors

type SidecarDetectors []SidecarDetector

wrapper for multiple mesh detectors. returns the first successfully detected mesh

func (SidecarDetectors) DetectMeshSidecar

func (d SidecarDetectors) DetectMeshSidecar(pod *corev1.Pod, meshes v1sets.MeshSet) *v1.Mesh

type WorkloadDetector

type WorkloadDetector interface {
	DetectWorkload(
		workload types.Workload,
		meshes v1sets.MeshSet,
	) *v1.Workload
}

the WorkloadDetector detects Workloads from workloads whose backing pods are injected with a Mesh sidecar. If no mesh is detected for the workload, nil is returned

func NewWorkloadDetector

func NewWorkloadDetector(
	ctx context.Context,
	pods corev1sets.PodSet,
	replicaSets appsv1sets.ReplicaSetSet,
	sidecarDetector SidecarDetector,
	injectionDetector InjectedWorkloadDetector,
) WorkloadDetector

Directories

Path Synopsis
Package mock_detector is a generated GoMock package.
Package mock_detector is a generated GoMock package.

Jump to

Keyboard shortcuts

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