Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { EndpointSlices *EndpointSliceInfo IPs *resourcelease.ResourceLeaseHistory[*resourcelease.K8sResourceLeaseHolder] // records lease history of NEG id to ServiceNetworkEndpointGroup NEGs *resourcelease.ResourceLeaseHistory[*resourcelease.K8sResourceLeaseHolder] PodSandboxIDs *resourcelease.ResourceLeaseHistory[*resourcelease.K8sResourceLeaseHolder] ContainerIDs *resourcelease.ResourceLeaseHistory[*resourcelease.ContainerLeaseHolder] // CRIResource *CRIResourceBinder ContainerStatuses *ContainerStatuses // contains filtered or unexported fields }
Cluster stores resource information(node name, Pod IP,Host IP...etc) used from another parser. This struct must modify the own fields in thread safe.
func NewClusterResourceInfo ¶
func NewClusterResourceInfo() *Cluster
func (*Cluster) GetNodeResourceIDTypeFromID ¶
func (c *Cluster) GetNodeResourceIDTypeFromID(id string, t time.Time) NodeResourceIDType
GetNodeResourceIDTypeFromID tries to find if the given id is for a pod sandbox or container at the given time.
type ContainerStatuses ¶
type ContainerStatuses struct {
// contains filtered or unexported fields
}
func (*ContainerStatuses) IsNewChange ¶
func (c *ContainerStatuses) IsNewChange(namespace string, podname string, containerName string, status corev1.ContainerStatus) bool
type EndpointSliceEndpointDiff ¶
type EndpointSliceEndpointDiff struct { Operation EndppointSliceEndpointDiffOperation Current *model.EndpointSliceEndpoint Previous *model.EndpointSliceEndpoint TargetRef *model.K8sTargetRef }
type EndpointSliceInfo ¶
type EndpointSliceInfo struct {
// contains filtered or unexported fields
}
func (*EndpointSliceInfo) GetLastDiffs ¶
func (e *EndpointSliceInfo) GetLastDiffs(uid string) ([]*EndpointSliceEndpointDiff, error)
func (*EndpointSliceInfo) ReadEndpointSlice ¶
func (e *EndpointSliceInfo) ReadEndpointSlice(reader *structure.Reader, time time.Time) (string, error)
ReadEndpointSlice parse given EndpointSlice manifest and returns the uid of endpoint slice
type EndppointSliceEndpointDiffOperation ¶
type EndppointSliceEndpointDiffOperation = string
const ( DiffNew EndppointSliceEndpointDiffOperation = "NEW" DiffChanged EndppointSliceEndpointDiffOperation = "CHANGED" DiffDeleted EndppointSliceEndpointDiffOperation = "DELETED" )
type NodeResourceIDType ¶
type NodeResourceIDType int
NodeResourceIDType is enums to represent the type of ids.
const ( NodeResourceIDTypeUnknown NodeResourceIDType = 0 NodeResourceIDTypeContainer NodeResourceIDType = 1 NodeResourceIDTypePodSandbox NodeResourceIDType = 2 )
Click to show internal directories.
Click to hide internal directories.