Documentation ¶
Index ¶
- func IdentifyEntity(target string, parent uuid.UUID) (uuid.UUID, error)
- func PacketApplications(applications []*Application) proto.PacketApplicationsStoreRequest
- func PacketNodes(nodes []kuber.Node) proto.PacketNodesStoreRequest
- type Application
- type Container
- type Entity
- type History
- func (history *History) FindContainer(namespace string, podName string, containerName string) (applicationID, serviceID uuid.UUID, container *Container, found bool)
- func (history *History) FindService(namespace string, podName string) (applicationID, serviceID uuid.UUID, found bool)
- func (history *History) PopulateContainer(namespace string, podName string, containerName string, ...)
- func (history *History) PopulateService(namespace string, podName string, applicationID uuid.UUID, serviceID uuid.UUID)
- type HistoryNamespace
- type HistoryPod
- type Scanner
- func (scanner *Scanner) AppsLastScanTime() time.Time
- func (scanner *Scanner) FindContainer(namespace string, podName string, containerName string) (uuid.UUID, uuid.UUID, *Container, bool)
- func (scanner *Scanner) FindContainerByID(apps []*Application, containerID uuid.UUID) (c *Container, s *Service, a *Application, found bool)
- func (scanner *Scanner) FindContainerByPodUIDContainerName(podUID string, containerName string) (applicationID uuid.UUID, serviceID uuid.UUID, containerID uuid.UUID, ...)
- func (scanner *Scanner) FindContainerNameByID(apps []*Application, containerID uuid.UUID) (name string, found bool)
- func (scanner *Scanner) FindContainerWithParents(namespace string, podName string, containerName string) (c *Container, s *Service, a *Application, found bool)
- func (scanner *Scanner) FindService(namespace string, podName string) (uuid.UUID, uuid.UUID, bool)
- func (scanner *Scanner) FindServiceByID(apps []*Application, serviceID uuid.UUID) (namespace, name, kind string, found bool)
- func (scanner *Scanner) GetApplications() []*Application
- func (scanner *Scanner) GetNodes() []kuber.Node
- func (scanner *Scanner) GetPods() []kv1.Pod
- func (scanner *Scanner) NodesLastScanTime() time.Time
- func (scanner *Scanner) SendAnalysisData(data map[string]interface{})
- func (scanner *Scanner) SendApplications(applications []*Application)
- func (scanner *Scanner) SendNodes(nodes []kuber.Node)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IdentifyEntity ¶
func PacketApplications ¶
func PacketApplications(applications []*Application) proto.PacketApplicationsStoreRequest
func PacketNodes ¶
func PacketNodes(nodes []kuber.Node) proto.PacketNodesStoreRequest
Types ¶
type Application ¶
type Application struct { Entity Services []*Service LimitRanges []kv1.LimitRange }
Application an abstraction layer representing a namespace
type Container ¶
type Container struct { Entity Image string Resources *proto.ContainerResourceRequirements `json:"resources"` LivenessProbe *kv1.Probe ReadinessProbe *kv1.Probe }
Container represents a single container controlled by a service if the container belongs to a pod with no controller, an orphand pod service automatically gets created as a parent
type History ¶
type History struct {
// contains filtered or unexported fields
}
History cluster history
func (*History) FindContainer ¶
func (history *History) FindContainer( namespace string, podName string, containerName string, ) (applicationID, serviceID uuid.UUID, container *Container, found bool)
FindContainer find container by names
func (*History) FindService ¶
func (history *History) FindService( namespace string, podName string, ) (applicationID, serviceID uuid.UUID, found bool)
FindService find service by names
func (*History) PopulateContainer ¶
func (history *History) PopulateContainer( namespace string, podName string, containerName string, applicationID uuid.UUID, serviceID uuid.UUID, container *Container, )
PopulateContainer populate history by a container
func (*History) PopulateService ¶
func (history *History) PopulateService( namespace string, podName string, applicationID uuid.UUID, serviceID uuid.UUID, )
PopulateService populate history by a service
type HistoryNamespace ¶
type HistoryNamespace struct {
// contains filtered or unexported fields
}
HistoryNamespace namespace history
type HistoryPod ¶
type HistoryPod struct {
// contains filtered or unexported fields
}
HistoryPod pod history
type Scanner ¶
Scanner cluster scanner
func InitScanner ¶
func InitScanner( client *client.Client, kube *kuber.Kube, skipNamespaces []string, accountID uuid.UUID, clusterID uuid.UUID, optInAnalysisData bool, analysisDataInterval time.Duration, ) *Scanner
InitScanner creates a new scanner then Start it
func (*Scanner) AppsLastScanTime ¶
func (*Scanner) FindContainer ¶
func (scanner *Scanner) FindContainer( namespace string, podName string, containerName string, ) (uuid.UUID, uuid.UUID, *Container, bool)
FindContainer returns app, service id and container from pod namespace, name and container name
func (*Scanner) FindContainerByID ¶
func (scanner *Scanner) FindContainerByID( apps []*Application, containerID uuid.UUID, ) (c *Container, s *Service, a *Application, found bool)
FindContainerByID returns container, service and application from container id
func (*Scanner) FindContainerByPodUIDContainerName ¶
func (scanner *Scanner) FindContainerByPodUIDContainerName( podUID string, containerName string, ) ( applicationID uuid.UUID, serviceID uuid.UUID, containerID uuid.UUID, podName string, ok bool, )
FindContainerByPodUIDContainerName find application, service, container id and pod name from kubernets pod id and container name
func (*Scanner) FindContainerNameByID ¶
func (scanner *Scanner) FindContainerNameByID( apps []*Application, containerID uuid.UUID, ) (name string, found bool)
FindContainerNameByID returns container name from container id
func (*Scanner) FindContainerWithParents ¶
func (scanner *Scanner) FindContainerWithParents( namespace string, podName string, containerName string, ) (c *Container, s *Service, a *Application, found bool)
FindContainerByID returns container, service and application from container name
func (*Scanner) FindService ¶
func (scanner *Scanner) FindService( namespace string, podName string, ) (uuid.UUID, uuid.UUID, bool)
FindService find app and service id from pod name and namespace
func (*Scanner) FindServiceByID ¶
func (scanner *Scanner) FindServiceByID( apps []*Application, serviceID uuid.UUID, ) (namespace, name, kind string, found bool)
FindServiceByID returns namespace, name and kind of a service by service id
func (*Scanner) GetApplications ¶
func (scanner *Scanner) GetApplications() []*Application
GetApplications get scanned applications
func (*Scanner) NodesLastScanTime ¶
func (*Scanner) SendAnalysisData ¶
SendAnalysisData sends analysis data if the user opts in
func (*Scanner) SendApplications ¶
func (scanner *Scanner) SendApplications(applications []*Application)
SendApplications sends scanned applications