Help us shape the future of Go! Take the 2026 Go Developer Survey

objectcache

package
v0.3.308 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectCacheImpl

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

func (*ObjectCacheImpl) ContainerProfileCache added in v0.3.108

func (o *ObjectCacheImpl) ContainerProfileCache() objectcache.ContainerProfileCache

func (*ObjectCacheImpl) DnsCache added in v0.2.128

func (o *ObjectCacheImpl) DnsCache() objectcache.DnsCache

func (*ObjectCacheImpl) K8sObjectCache

func (o *ObjectCacheImpl) K8sObjectCache() objectcache.K8sObjectCache

type RuleObjectCacheMock added in v0.3.3

type RuleObjectCacheMock struct {
	ContainerIDToSharedData *maps.SafeMap[string, *objectcache.WatchedContainerData]
	// contains filtered or unexported fields
}

RuleObjectCacheMock is a test double for RuleObjectCache.

The unified ContainerProfile is the only profile surface. Tests seed it with SetContainerProfile (single-container, backward-compat pointer r.cp) or by populating cpByContainerName directly for multi-container cases; the per-container map is authoritative when a WatchedContainerData InstanceID is registered for the queried containerID.

func (*RuleObjectCacheMock) AddHandler added in v0.3.3

func (r *RuleObjectCacheMock) AddHandler(_ context.Context, _ runtime.Object)

func (*RuleObjectCacheMock) ContainerCallback added in v0.3.3

func (r *RuleObjectCacheMock) ContainerCallback(_ containercollection.PubSubEvent)

func (*RuleObjectCacheMock) ContainerProfileCache added in v0.3.108

func (r *RuleObjectCacheMock) ContainerProfileCache() objectcache.ContainerProfileCache

func (*RuleObjectCacheMock) DeleteHandler added in v0.3.3

func (r *RuleObjectCacheMock) DeleteHandler(_ context.Context, _ runtime.Object)

func (*RuleObjectCacheMock) DeleteSharedContainerData added in v0.3.3

func (r *RuleObjectCacheMock) DeleteSharedContainerData(containerID string)

func (*RuleObjectCacheMock) DnsCache added in v0.3.3

func (*RuleObjectCacheMock) GetApiServerIpAddress added in v0.3.3

func (r *RuleObjectCacheMock) GetApiServerIpAddress() string

func (*RuleObjectCacheMock) GetCallStackSearchTree added in v0.3.3

func (r *RuleObjectCacheMock) GetCallStackSearchTree(string) *callstackcache.CallStackSearchTree

func (*RuleObjectCacheMock) GetContainerProfile added in v0.3.108

func (r *RuleObjectCacheMock) GetContainerProfile(containerID string) *v1beta1.ContainerProfile

func (*RuleObjectCacheMock) GetContainerProfileState added in v0.3.108

func (r *RuleObjectCacheMock) GetContainerProfileState(_ string) *objectcache.ProfileState

GetContainerProfileState returns the state set via SetContainerProfileState, or a synthetic "not found" error state by default. It never returns nil, mirroring the real ContainerProfileCache implementation.

func (*RuleObjectCacheMock) GetPod added in v0.3.3

func (r *RuleObjectCacheMock) GetPod(_, _ string) *corev1.Pod

func (*RuleObjectCacheMock) GetPodByIP added in v0.3.254

func (r *RuleObjectCacheMock) GetPodByIP(ip string) *corev1.Pod

GetPodByIP resolves the configured mock pod by primary or secondary IP, or returns nil.

func (*RuleObjectCacheMock) GetPodSpec added in v0.3.3

func (r *RuleObjectCacheMock) GetPodSpec(_, _ string) *corev1.PodSpec

func (*RuleObjectCacheMock) GetPodStatus added in v0.3.3

func (r *RuleObjectCacheMock) GetPodStatus(_, _ string) *corev1.PodStatus

func (*RuleObjectCacheMock) GetPods added in v0.3.3

func (r *RuleObjectCacheMock) GetPods() []*corev1.Pod

func (*RuleObjectCacheMock) GetProjectedContainerProfile added in v0.3.111

func (r *RuleObjectCacheMock) GetProjectedContainerProfile(containerID string) *objectcache.ProjectedContainerProfile

func (*RuleObjectCacheMock) GetSharedContainerData added in v0.3.3

func (r *RuleObjectCacheMock) GetSharedContainerData(containerID string) *objectcache.WatchedContainerData

func (*RuleObjectCacheMock) K8sObjectCache added in v0.3.3

func (r *RuleObjectCacheMock) K8sObjectCache() objectcache.K8sObjectCache

func (*RuleObjectCacheMock) ModifyHandler added in v0.3.3

func (r *RuleObjectCacheMock) ModifyHandler(_ context.Context, _ runtime.Object)

func (*RuleObjectCacheMock) ResolveIpToDomain added in v0.3.3

func (r *RuleObjectCacheMock) ResolveIpToDomain(containerID string, ip string) string

func (*RuleObjectCacheMock) SetContainerProfile added in v0.3.108

func (r *RuleObjectCacheMock) SetContainerProfile(cp *v1beta1.ContainerProfile)

func (*RuleObjectCacheMock) SetContainerProfileState added in v0.3.241

func (r *RuleObjectCacheMock) SetContainerProfileState(state *objectcache.ProfileState)

SetContainerProfileState overrides the state returned by GetContainerProfileState (default: a synthetic "not found" error state).

func (*RuleObjectCacheMock) SetDnsCache added in v0.3.3

func (r *RuleObjectCacheMock) SetDnsCache(dnsCache map[string]string)

func (*RuleObjectCacheMock) SetPodSpec added in v0.3.3

func (r *RuleObjectCacheMock) SetPodSpec(podSpec *corev1.PodSpec)

func (*RuleObjectCacheMock) SetPodStatus added in v0.3.3

func (r *RuleObjectCacheMock) SetPodStatus(podStatus *corev1.PodStatus)

func (*RuleObjectCacheMock) SetProjectionSpec added in v0.3.111

func (r *RuleObjectCacheMock) SetProjectionSpec(spec objectcache.RuleProjectionSpec)

func (*RuleObjectCacheMock) SetSharedContainerData added in v0.3.3

func (r *RuleObjectCacheMock) SetSharedContainerData(containerID string, data *objectcache.WatchedContainerData)

func (*RuleObjectCacheMock) Start added in v0.3.108

func (r *RuleObjectCacheMock) Start(_ context.Context)

func (*RuleObjectCacheMock) WatchResources added in v0.3.3

func (r *RuleObjectCacheMock) WatchResources() []watcher.WatchResource

Jump to

Keyboard shortcuts

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