objectcache

package
v0.2.236 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTerminationExitCode

func GetTerminationExitCode(k8sObjectsCache K8sObjectCache, namespace, podName, containerName, containerID string) int32

GetTerminationExitCode returns the termination exit code of the container, otherwise -1

func ListContainersIDs

func ListContainersIDs(pod *corev1.Pod) []string

list containerIDs from pod status

func ListTerminatedContainers

func ListTerminatedContainers(pod *corev1.Pod) []string

list terminated containers from pod status

func MetaUniqueName added in v0.2.140

func MetaUniqueName(obj metav1.Object) string

func UniqueName

func UniqueName(namespace, name string) string

Types

type ApplicationProfileCache

type ApplicationProfileCache interface {
	GetApplicationProfile(containerID string) *v1beta1.ApplicationProfile
	WatchResources() []watcher.WatchResource
	AddHandler(ctx context.Context, obj runtime.Object)
	ModifyHandler(ctx context.Context, obj runtime.Object)
	DeleteHandler(ctx context.Context, obj runtime.Object)
}

type ApplicationProfileCacheMock

type ApplicationProfileCacheMock struct {
}

func (*ApplicationProfileCacheMock) AddHandler added in v0.2.231

func (*ApplicationProfileCacheMock) DeleteHandler added in v0.2.231

func (ap *ApplicationProfileCacheMock) DeleteHandler(_ context.Context, _ runtime.Object)

func (*ApplicationProfileCacheMock) GetApplicationProfile

func (ap *ApplicationProfileCacheMock) GetApplicationProfile(_ string) *v1beta1.ApplicationProfile

func (*ApplicationProfileCacheMock) ModifyHandler added in v0.2.231

func (ap *ApplicationProfileCacheMock) ModifyHandler(_ context.Context, _ runtime.Object)

func (*ApplicationProfileCacheMock) WatchResources added in v0.2.231

func (ap *ApplicationProfileCacheMock) WatchResources() []watcher.WatchResource

type DnsCache added in v0.2.128

type DnsCache interface {
	ResolveIpToDomain(ip string) string
}

type DnsCacheMock added in v0.2.128

type DnsCacheMock struct {
}

func (*DnsCacheMock) ResolveIpToDomain added in v0.2.128

func (dc *DnsCacheMock) ResolveIpToDomain(_ string) string

type K8sObjectCache

type K8sObjectCache interface {
	GetPodSpec(namespace, podName string) *corev1.PodSpec
	GetPodStatus(namespace, podName string) *corev1.PodStatus
	GetApiServerIpAddress() string
	GetPods() []*corev1.Pod
	GetPod(namespace, podName string) *corev1.Pod
	SetSharedContainerData(containerID string, data *utils.WatchedContainerData)
	GetSharedContainerData(containerID string) *utils.WatchedContainerData
	DeleteSharedContainerData(containerID string)
}

type K8sObjectCacheMock

type K8sObjectCacheMock struct {
	ApiServerIpAddress string
	PodSpec            corev1.PodSpec
	PodStatus          corev1.PodStatus
	// contains filtered or unexported fields
}

func (*K8sObjectCacheMock) DeleteSharedContainerData added in v0.2.231

func (k *K8sObjectCacheMock) DeleteSharedContainerData(containerID string)

func (*K8sObjectCacheMock) GetApiServerIpAddress

func (k *K8sObjectCacheMock) GetApiServerIpAddress() string

func (*K8sObjectCacheMock) GetPod added in v0.2.231

func (k *K8sObjectCacheMock) GetPod(_, _ string) *corev1.Pod

func (*K8sObjectCacheMock) GetPodSpec

func (k *K8sObjectCacheMock) GetPodSpec(_, _ string) *corev1.PodSpec

func (*K8sObjectCacheMock) GetPodStatus

func (k *K8sObjectCacheMock) GetPodStatus(_, _ string) *corev1.PodStatus

func (*K8sObjectCacheMock) GetPods

func (k *K8sObjectCacheMock) GetPods() []*corev1.Pod

func (*K8sObjectCacheMock) GetSharedContainerData added in v0.2.231

func (k *K8sObjectCacheMock) GetSharedContainerData(containerID string) *utils.WatchedContainerData

func (*K8sObjectCacheMock) SetSharedContainerData added in v0.2.231

func (k *K8sObjectCacheMock) SetSharedContainerData(containerID string, data *utils.WatchedContainerData)

type NetworkNeighborhoodCache

type NetworkNeighborhoodCache interface {
	GetNetworkNeighborhood(containerID string) *v1beta1.NetworkNeighborhood
	WatchResources() []watcher.WatchResource
	AddHandler(ctx context.Context, obj runtime.Object)
	ModifyHandler(ctx context.Context, obj runtime.Object)
	DeleteHandler(ctx context.Context, obj runtime.Object)
}

type NetworkNeighborhoodCacheMock

type NetworkNeighborhoodCacheMock struct {
}

func (*NetworkNeighborhoodCacheMock) AddHandler added in v0.2.231

func (*NetworkNeighborhoodCacheMock) DeleteHandler added in v0.2.231

func (ap *NetworkNeighborhoodCacheMock) DeleteHandler(_ context.Context, _ runtime.Object)

func (*NetworkNeighborhoodCacheMock) GetNetworkNeighborhood

func (ap *NetworkNeighborhoodCacheMock) GetNetworkNeighborhood(_ string) *v1beta1.NetworkNeighborhood

func (*NetworkNeighborhoodCacheMock) ModifyHandler added in v0.2.231

func (ap *NetworkNeighborhoodCacheMock) ModifyHandler(_ context.Context, _ runtime.Object)

func (*NetworkNeighborhoodCacheMock) WatchResources added in v0.2.231

func (ap *NetworkNeighborhoodCacheMock) WatchResources() []watcher.WatchResource

type ObjectCache

type ObjectCache interface {
	K8sObjectCache() K8sObjectCache
	ApplicationProfileCache() ApplicationProfileCache
	NetworkNeighborhoodCache() NetworkNeighborhoodCache
	DnsCache() DnsCache
}

type ObjectCacheMock

type ObjectCacheMock struct {
}

func NewObjectCacheMock

func NewObjectCacheMock() *ObjectCacheMock

func (*ObjectCacheMock) ApplicationProfileCache

func (om *ObjectCacheMock) ApplicationProfileCache() ApplicationProfileCache

func (*ObjectCacheMock) DnsCache added in v0.2.128

func (om *ObjectCacheMock) DnsCache() DnsCache

func (*ObjectCacheMock) K8sObjectCache

func (om *ObjectCacheMock) K8sObjectCache() K8sObjectCache

func (*ObjectCacheMock) NetworkNeighborhoodCache

func (om *ObjectCacheMock) NetworkNeighborhoodCache() NetworkNeighborhoodCache

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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