Documentation
¶
Index ¶
- Constants
- func GetLabels(watchedContainer *WatchedContainerData, stripContainer bool) map[string]string
- func GetTerminationExitCode(k8sObjectsCache K8sObjectCache, ...) int32
- func ListContainersIDs(pod *corev1.Pod) []string
- func ListTerminatedContainers(pod *corev1.Pod) []string
- func MetaUniqueName(obj metav1.Object) string
- func UniqueName(namespace, name string) string
- type ApplicationProfileCache
- type ApplicationProfileCacheMock
- func (ap *ApplicationProfileCacheMock) ContainerCallback(_ containercollection.PubSubEvent)
- func (ap *ApplicationProfileCacheMock) GetApplicationProfile(_ string) *v1beta1.ApplicationProfile
- func (ap *ApplicationProfileCacheMock) GetApplicationProfileState(_ string) *ProfileState
- func (ap *ApplicationProfileCacheMock) GetCallStackSearchTree(_ string) *callstackcache.CallStackSearchTree
- type ContainerInfo
- type ContainerType
- type DnsCache
- type DnsCacheMock
- type K8sObjectCache
- type K8sObjectCacheMock
- func (k *K8sObjectCacheMock) DeleteSharedContainerData(containerID string)
- func (k *K8sObjectCacheMock) GetApiServerIpAddress() string
- func (k *K8sObjectCacheMock) GetPod(_, _ string) *corev1.Pod
- func (k *K8sObjectCacheMock) GetPodSpec(_, _ string) *corev1.PodSpec
- func (k *K8sObjectCacheMock) GetPodStatus(_, _ string) *corev1.PodStatus
- func (k *K8sObjectCacheMock) GetPods() []*corev1.Pod
- func (k *K8sObjectCacheMock) GetSharedContainerData(containerID string) *WatchedContainerData
- func (k *K8sObjectCacheMock) SetSharedContainerData(containerID string, data *WatchedContainerData)
- type NetworkNeighborhoodCache
- type NetworkNeighborhoodCacheMock
- type ObjectCache
- type ObjectCacheMock
- type ProfileState
- type WatchedContainerCompletionStatus
- type WatchedContainerData
- func (watchedContainer *WatchedContainerData) GetCompletionStatus() WatchedContainerCompletionStatus
- func (watchedContainer *WatchedContainerData) GetStatus() WatchedContainerStatus
- func (watchedContainer *WatchedContainerData) SetCompletionStatus(newStatus WatchedContainerCompletionStatus)
- func (watchedContainer *WatchedContainerData) SetContainerInfo(wl workloadinterface.IWorkload, containerName string) error
- func (watchedContainer *WatchedContainerData) SetStatus(newStatus WatchedContainerStatus)
- type WatchedContainerStatus
Constants ¶
View Source
const ( // ContainerType represents the type of container in a pod Unknown = iota Container InitContainer EphemeralContainer )
Variables ¶
This section is empty.
Functions ¶
func GetLabels ¶ added in v0.2.351
func GetLabels(watchedContainer *WatchedContainerData, stripContainer bool) map[string]string
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 ¶
list containerIDs from pod status
func ListTerminatedContainers ¶
list terminated containers from pod status
func MetaUniqueName ¶ added in v0.2.140
func UniqueName ¶
Types ¶
type ApplicationProfileCache ¶
type ApplicationProfileCache interface { GetApplicationProfile(containerID string) *v1beta1.ApplicationProfile GetApplicationProfileState(containerID string) *ProfileState GetCallStackSearchTree(containerID string) *callstackcache.CallStackSearchTree ContainerCallback(notif containercollection.PubSubEvent) }
type ApplicationProfileCacheMock ¶
type ApplicationProfileCacheMock struct { }
func (*ApplicationProfileCacheMock) ContainerCallback ¶ added in v0.2.332
func (ap *ApplicationProfileCacheMock) ContainerCallback(_ containercollection.PubSubEvent)
func (*ApplicationProfileCacheMock) GetApplicationProfile ¶
func (ap *ApplicationProfileCacheMock) GetApplicationProfile(_ string) *v1beta1.ApplicationProfile
func (*ApplicationProfileCacheMock) GetApplicationProfileState ¶ added in v0.2.332
func (ap *ApplicationProfileCacheMock) GetApplicationProfileState(_ string) *ProfileState
func (*ApplicationProfileCacheMock) GetCallStackSearchTree ¶ added in v0.2.246
func (ap *ApplicationProfileCacheMock) GetCallStackSearchTree(_ string) *callstackcache.CallStackSearchTree
type ContainerInfo ¶ added in v0.2.351
type ContainerType ¶ added in v0.2.351
type ContainerType int
func (ContainerType) String ¶ added in v0.2.351
func (c ContainerType) 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 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) *WatchedContainerData
func (*K8sObjectCacheMock) SetSharedContainerData ¶ added in v0.2.231
func (k *K8sObjectCacheMock) SetSharedContainerData(containerID string, data *WatchedContainerData)
type NetworkNeighborhoodCache ¶
type NetworkNeighborhoodCache interface { GetNetworkNeighborhood(containerID string) *v1beta1.NetworkNeighborhood GetNetworkNeighborhoodState(containerID string) *ProfileState ContainerCallback(notif containercollection.PubSubEvent) }
type NetworkNeighborhoodCacheMock ¶
type NetworkNeighborhoodCacheMock struct { }
func (*NetworkNeighborhoodCacheMock) ContainerCallback ¶ added in v0.2.332
func (nn *NetworkNeighborhoodCacheMock) ContainerCallback(_ containercollection.PubSubEvent)
func (*NetworkNeighborhoodCacheMock) GetNetworkNeighborhood ¶
func (nn *NetworkNeighborhoodCacheMock) GetNetworkNeighborhood(_ string) *v1beta1.NetworkNeighborhood
func (*NetworkNeighborhoodCacheMock) GetNetworkNeighborhoodState ¶ added in v0.2.332
func (nn *NetworkNeighborhoodCacheMock) GetNetworkNeighborhoodState(_ string) *ProfileState
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
type ProfileState ¶ added in v0.2.332
type WatchedContainerCompletionStatus ¶ added in v0.2.351
type WatchedContainerCompletionStatus string
const ( // WatchedContainerCompletionStatus represents the completion status of a watched container WatchedContainerCompletionStatusPartial WatchedContainerCompletionStatus = helpersv1.Partial WatchedContainerCompletionStatusFull WatchedContainerCompletionStatus = helpersv1.Full )
type WatchedContainerData ¶ added in v0.2.351
type WatchedContainerData struct { InstanceID instanceidhandler.IInstanceID UpdateDataTicker *time.Ticker SyncChannel chan error AckChan chan struct{} ParentResourceVersion string ContainerID string ImageTag string ImageID string Wlid string ContainerType ContainerType ContainerIndex int ContainerInfos map[ContainerType][]ContainerInfo NsMntId uint64 InitialDelayExpired bool ParentWorkloadSelector *metav1.LabelSelector SeccompProfilePath *string PreRunningContainer bool SeriesID string PreviousReportTimestamp time.Time CurrentReportTimestamp time.Time // contains filtered or unexported fields }
func (*WatchedContainerData) GetCompletionStatus ¶ added in v0.2.351
func (watchedContainer *WatchedContainerData) GetCompletionStatus() WatchedContainerCompletionStatus
func (*WatchedContainerData) GetStatus ¶ added in v0.2.351
func (watchedContainer *WatchedContainerData) GetStatus() WatchedContainerStatus
func (*WatchedContainerData) SetCompletionStatus ¶ added in v0.2.351
func (watchedContainer *WatchedContainerData) SetCompletionStatus(newStatus WatchedContainerCompletionStatus)
func (*WatchedContainerData) SetContainerInfo ¶ added in v0.2.351
func (watchedContainer *WatchedContainerData) SetContainerInfo(wl workloadinterface.IWorkload, containerName string) error
func (*WatchedContainerData) SetStatus ¶ added in v0.2.351
func (watchedContainer *WatchedContainerData) SetStatus(newStatus WatchedContainerStatus)
type WatchedContainerStatus ¶ added in v0.2.351
type WatchedContainerStatus string
const ( // WatchedContainerStatus represents the status of a watched container WatchedContainerStatusInitializing WatchedContainerStatus = helpersv1.Initializing WatchedContainerStatusReady WatchedContainerStatus = helpersv1.Learning WatchedContainerStatusCompleted WatchedContainerStatus = helpersv1.Completed WatchedContainerStatusFailed WatchedContainerStatus = helpersv1.Failed WatchedContainerStatusMissingRuntime WatchedContainerStatus = helpersv1.MissingRuntime WatchedContainerStatusTooLarge WatchedContainerStatus = helpersv1.TooLarge )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.