Documentation ¶
Index ¶
- Constants
- func CreateOrGetDaemonsetByID(xid string) string
- func CreateOrGetDeploymentByID(xid string) string
- func CreateOrGetJobByID(xid string) string
- func CreateOrGetNamespaceByID(xid string) string
- func CreateOrGetPersistentVolumeByID(xid string) string
- func CreateOrGetPersistentVolumeClaimByID(xid string) string
- func CreateOrGetReplicasetByID(xid string) string
- func CreateOrGetStatefulsetByID(xid string) string
- func StoreAndRetrieveContainersAndMetrics(pod api_v1.Pod, podUID, namespaceUID string) ([]*Container, Metrics)
- func StoreContainerProcessEdge(containerXID string, procsXIDs []string) error
- func StoreDaemonset(daemonset ext_v1beta1.DaemonSet) (string, error)
- func StoreDeployment(deployment apps_v1beta1.Deployment) (string, error)
- func StoreGroupCRD(group groups_v1.Group) (string, error)
- func StoreJob(job batch_v1.Job) (string, error)
- func StoreNamespace(namespace api_v1.Namespace) (string, error)
- func StoreNode(node api_v1.Node) (string, error)
- func StorePersistentVolume(pv api_v1.PersistentVolume) (string, error)
- func StorePersistentVolumeClaim(pvc api_v1.PersistentVolumeClaim) (string, error)
- func StorePod(k8sPod api_v1.Pod) error
- func StorePodServiceEdges(svcXID string, podsXIDsInService []string) error
- func StorePodsInteraction(sourcePodXID string, destinationPodsXIDs []string, counts []float64) error
- func StoreProcess(procXID, containerXID string, podsXIDs []string, creationTimeStamp time.Time) error
- func StoreReplicaset(replicaset ext_v1beta1.ReplicaSet) (string, error)
- func StoreService(service api_v1.Service) error
- func StoreServicesInteraction(sourceServiceXID string, destinationServicesXIDs []string) error
- func StoreStatefulset(statefulset apps_v1beta1.StatefulSet) (string, error)
- func StoreSubscriberCRD(subscriber subscribers_v1.Subscriber) (string, error)
- type Container
- type Daemonset
- type Deployment
- type GroupCRD
- type Job
- type Metrics
- type Namespace
- type Node
- type PersistentVolume
- type PersistentVolumeClaim
- type Pod
- type Proc
- type Replicaset
- type Service
- type Statefulset
- type SubscriberCRD
Constants ¶
const (
IsContainer = "isContainer"
)
Dgraph Model Constants
const (
IsDaemonset = "isDaemonset"
)
Dgraph Model Constants
const (
IsDeployment = "isDeployment"
)
Dgraph Model Constants
const (
IsJob = "isJob"
)
Dgraph Model Constants
const (
IsNamespace = "isNamespace"
)
Dgraph Model Constants
const (
IsNode = "isNode"
)
Dgraph Model Constants
const (
IsPersistentVolume = "isPersistentVolume"
)
Dgraph Model Constants
const (
IsPersistentVolumeClaim = "isPersistentVolumeClaim"
)
Dgraph Model Constants
const (
IsPod = "isPod"
)
Dgraph Model Constants
const (
IsProc = "isProc"
)
Dgraph Model Constants
const (
IsPurserGroup = "isPurserGroup"
)
Dgraph Model Constants
const (
IsReplicaset = "isReplicaset"
)
Dgraph Model Constants
const (
IsService = "isService"
)
Dgraph Model Constants
const (
IsStatefulset = "isStatefulset"
)
Dgraph Model Constants
const (
IsSubscriber = "isSubscriber"
)
Dgraph Model Constants
Variables ¶
This section is empty.
Functions ¶
func CreateOrGetDaemonsetByID ¶
CreateOrGetDaemonsetByID returns the uid of namespace if exists, otherwise creates the daemonset and returns uid.
func CreateOrGetDeploymentByID ¶
CreateOrGetDeploymentByID returns the uid of namespace if exists, otherwise creates the deployment and returns uid.
func CreateOrGetJobByID ¶
CreateOrGetJobByID returns the uid of namespace if exists, otherwise creates the job and returns uid.
func CreateOrGetNamespaceByID ¶
CreateOrGetNamespaceByID returns the uid of namespace if exists, otherwise creates the namespace and returns uid.
func CreateOrGetPersistentVolumeByID ¶
CreateOrGetPersistentVolumeByID returns the uid of persistent volume if exists, otherwise creates the persistent volume and returns uid.
func CreateOrGetPersistentVolumeClaimByID ¶
CreateOrGetPersistentVolumeClaimByID returns the uid of pvc if exists, otherwise creates the pvc and returns uid.
func CreateOrGetReplicasetByID ¶
CreateOrGetReplicasetByID returns the uid of namespace if exists, otherwise creates the replicaset and returns uid.
func CreateOrGetStatefulsetByID ¶
CreateOrGetStatefulsetByID returns the uid of namespace if exists, otherwise creates the stateful and returns uid.
func StoreAndRetrieveContainersAndMetrics ¶
func StoreAndRetrieveContainersAndMetrics(pod api_v1.Pod, podUID, namespaceUID string) ([]*Container, Metrics)
StoreAndRetrieveContainersAndMetrics fetchs the list of containers in given pod Create a new container in dgraph if container is not in it.
func StoreContainerProcessEdge ¶
StoreContainerProcessEdge ...
func StoreDaemonset ¶
func StoreDaemonset(daemonset ext_v1beta1.DaemonSet) (string, error)
StoreDaemonset create a new daemonset in the Dgraph and updates if already present.
func StoreDeployment ¶
func StoreDeployment(deployment apps_v1beta1.Deployment) (string, error)
StoreDeployment create a new deployment in the Dgraph and updates if already present.
func StoreGroupCRD ¶
StoreGroupCRD create a new group CRD in the Dgraph and updates if already present.
func StoreNamespace ¶
StoreNamespace create a new namespace in the Dgraph if it is not present.
func StorePersistentVolume ¶
func StorePersistentVolume(pv api_v1.PersistentVolume) (string, error)
StorePersistentVolume create a new persistent volume in the Dgraph and updates if already present.
func StorePersistentVolumeClaim ¶
func StorePersistentVolumeClaim(pvc api_v1.PersistentVolumeClaim) (string, error)
StorePersistentVolumeClaim create a new pvc in the Dgraph and updates if already present.
func StorePod ¶
StorePod updates the pod details and create it a new node if not exists. It also populates Containers of a pod.
func StorePodServiceEdges ¶
StorePodServiceEdges saves pods in Services object in the dgraph
func StorePodsInteraction ¶
func StorePodsInteraction(sourcePodXID string, destinationPodsXIDs []string, counts []float64) error
StorePodsInteraction store the pod interactions in Dgraph
func StoreProcess ¶
func StoreProcess(procXID, containerXID string, podsXIDs []string, creationTimeStamp time.Time) error
StoreProcess ...
func StoreReplicaset ¶
func StoreReplicaset(replicaset ext_v1beta1.ReplicaSet) (string, error)
StoreReplicaset create a new replicaset in the Dgraph and updates if already present.
func StoreService ¶
StoreService create a new node in the Dgraph if it is not present.
func StoreServicesInteraction ¶
StoreServicesInteraction stores the service interaction data in the Dgraph
func StoreStatefulset ¶
func StoreStatefulset(statefulset apps_v1beta1.StatefulSet) (string, error)
StoreStatefulset create a new statefulset in the Dgraph and updates if already present.
func StoreSubscriberCRD ¶
func StoreSubscriberCRD(subscriber subscribers_v1.Subscriber) (string, error)
StoreSubscriberCRD create a new subscriber CRD in the Dgraph and updates if already present.
Types ¶
type Container ¶
type Container struct { dgraph.ID IsContainer bool `json:"isContainer,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Pod Pod `json:"pod,omitempty"` Procs []*Proc `json:"procs,omitempty"` Namespace *Namespace `json:"namespace,omitempty"` CPURequest float64 `json:"cpuRequest,omitempty"` CPULimit float64 `json:"cpuLimit,omitempty"` MemoryRequest float64 `json:"memoryRequest,omitempty"` MemoryLimit float64 `json:"memoryLimit,omitempty"` Type string `json:"type,omitempty"` }
Container schema in dgraph
type Daemonset ¶
type Daemonset struct { dgraph.ID IsDaemonset bool `json:"isDaemonset,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Namespace *Namespace `json:"namespace,omitempty"` Pods []*Pod `json:"pod,omitempty"` Type string `json:"type,omitempty"` }
Daemonset schema in dgraph
type Deployment ¶
type Deployment struct { dgraph.ID IsDeployment bool `json:"isDeployment,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Namespace *Namespace `json:"namespace,omitempty"` Pods []*Pod `json:"pod,omitempty"` Type string `json:"type,omitempty"` }
Deployment schema in dgraph
type GroupCRD ¶
type GroupCRD struct { dgraph.ID IsPurserGroup bool `json:"isPurserGroup,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Type string `json:"type,omitempty"` }
GroupCRD schema in dgraph
type Job ¶
type Job struct { dgraph.ID IsJob bool `json:"isJob,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Namespace *Namespace `json:"namespace,omitempty"` Pods []*Pod `json:"pod,omitempty"` Type string `json:"type,omitempty"` }
Job schema in dgraph
type Metrics ¶
type Metrics struct { CPURequest float64 CPULimit float64 MemoryRequest float64 MemoryLimit float64 }
Metrics ...
type Namespace ¶
type Namespace struct { dgraph.ID IsNamespace bool `json:"isNamespace,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Type string `json:"type,omitempty"` }
Namespace schema in dgraph
type Node ¶
type Node struct { dgraph.ID IsNode bool `json:"isNode,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Pods []*Pod `json:"pods,omitempty"` CPUCapity float64 `json:"cpuCapacity,omitempty"` MemoryCapacity float64 `json:"memoryCapacity,omitempty"` Type string `json:"type,omitempty"` }
Node schema in dgraph
type PersistentVolume ¶
type PersistentVolume struct { dgraph.ID IsPersistentVolume bool `json:"isPersistentVolume,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Type string `json:"type,omitempty"` StorageCapacity float64 `json:"storageCapacity,omitempty"` }
PersistentVolume schema in dgraph
type PersistentVolumeClaim ¶
type PersistentVolumeClaim struct { dgraph.ID IsPersistentVolumeClaim bool `json:"isPersistentVolumeClaim,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Namespace *Namespace `json:"namespace,omitempty"` Type string `json:"type,omitempty"` StorageCapacity float64 `json:"storageCapacity,omitempty"` PersistentVolume *PersistentVolume `json:"persistentvolume,omitempty"` }
PersistentVolumeClaim schema in dgraph
type Pod ¶
type Pod struct { dgraph.ID IsPod bool `json:"isPod,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Containers []*Container `json:"containers,omitempty"` Pods []*Pod `json:"pod,omitempty"` Count float64 `json:"pod|count,omitempty"` Node *Node `json:"node,omitempty"` Namespace *Namespace `json:"namespace,omitempty"` Deployment *Deployment `json:"deployment,omitempty"` Replicaset *Replicaset `json:"replicaset,omitempty"` Statefulset *Statefulset `json:"statefulset,omitempty"` Daemonset *Daemonset `json:"daemonset,omitempty"` Job *Job `json:"job,omitempty"` Pvcs []*PersistentVolumeClaim `json:"pvc,omitempty"` CPURequest float64 `json:"cpuRequest,omitempty"` CPULimit float64 `json:"cpuLimit,omitempty"` MemoryRequest float64 `json:"memoryRequest,omitempty"` MemoryLimit float64 `json:"memoryLimit,omitempty"` StorageRequest float64 `json:"storageRequest,omitempty"` Type string `json:"type,omitempty"` Cid []Service `json:"cid,omitempty"` }
Pod schema in dgraph
type Proc ¶
type Proc struct { dgraph.ID IsProc bool `json:"isProc,omitemtpy"` Name string `json:"name,omitempty"` Interacts []*Pod `json:"interacts,omitempty"` Container Container `json:"container,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Namespace *Namespace `json:"namespace,omitempty"` Type string `json:"type,omitempty"` }
Proc schema in dgraph
type Replicaset ¶
type Replicaset struct { dgraph.ID IsReplicaset bool `json:"isReplicaset,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Namespace *Namespace `json:"namespace,omitempty"` Deployment *Deployment `json:"deployment,omitempty"` Pods []*Pod `json:"pod,omitempty"` Type string `json:"type,omitempty"` }
Replicaset schema in dgraph
type Service ¶
type Service struct { dgraph.ID IsService bool `json:"isService,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Pod []*Pod `json:"pod,omitempty"` Interacts []*Service `json:"interacts,omitempty"` Namespace *Namespace `json:"namespace,omitempty"` Type string `json:"type,omitempty"` }
Service model structure in Dgraph
func RetrieveAllServices ¶
RetrieveAllServices returns all pods in the dgraph
func RetrieveAllServicesWithDstPods ¶
RetrieveAllServicesWithDstPods returns all pods in the dgraph
type Statefulset ¶
type Statefulset struct { dgraph.ID IsStatefulset bool `json:"isStatefulset,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Namespace *Namespace `json:"namespace,omitempty"` Pods []*Pod `json:"pods,omitempty"` Type string `json:"type,omitempty"` }
Statefulset schema in dgraph
type SubscriberCRD ¶
type SubscriberCRD struct { dgraph.ID IsSubscriber bool `json:"isSubscriber,omitempty"` Name string `json:"name,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Type string `json:"type,omitempty"` }
SubscriberCRD schema in dgraph