Documentation ¶
Index ¶
- Constants
- type ContainerEvents
- type FlowEvents
- type Graph
- func (g *Graph) FindLinksBetweenGivenTimeAndOrNamespace(starttime time.Time, endtime time.Time, namespace string)
- func (g *Graph) FindNodesBetweenGivenTimeAndOrNamespace(starttime time.Time, endtime time.Time, namespace string)
- func (g *Graph) GetData(w http.ResponseWriter, r *http.Request)
- func (g *Graph) GetGraph(w http.ResponseWriter, r *http.Request)
- func (g *Graph) Start(interval int)
- type GraphData
- type Link
- type Node
Constants ¶
View Source
const ( // ContainerEventsQuery is the query used to retrieve ContainerEvents from database ContainerEventsQuery = "SELECT * FROM ContainerEvents" // FlowEventsQuery is the query used to retrieve FlowEvents from database FlowEventsQuery = "SELECT * FROM FlowEvents" )
View Source
const ( // FlowReject indicates that a flow was rejected FlowReject = "reject" // FlowAccept logs that a flow is accepted FlowAccept = "accept" // FlowNowRejected logs that a flow is accepted and later rejected FlowNowRejected = "nowrejected" // ContainerStart indicates a container start event ContainerStart = "start" // ContainerStop indicates a container stop event ContainerStop = "stop" // ContainerCreate indicates a container create event ContainerCreate = "create" // ContainerDelete indicates a container delete event ContainerDelete = "delete" // ContainerUpdate indicates a container policy update event ContainerUpdate = "update" // ContainerFailed indicates an event that a container was stopped because of policy issues ContainerFailed = "forcestop" // ContainerIgnored indicates that the container will be ignored by Trireme ContainerIgnored = "ignore" // UnknownContainerDelete indicates that policy for an unknown container was deleted UnknownContainerDelete = "unknowncontainer" )
View Source
const ( // ContainerEvent is the Container events measurement name ContainerEvent = "ContainerEvents" // FlowEvent is the Flow events measurement name FlowEvent = "FlowEvents" )
View Source
const ( // PODNameFromContainerTags is tha tag used to retrieve pod name from tags in ContainerEvents PODNameFromContainerTags = "@usr:io.kubernetes.pod.name" // PODNamespaceFromContainerTags is the tag used to retrieve pod namespace from tags in ContainerEvents PODNamespaceFromContainerTags = "@usr:io.kubernetes.pod.namespace" // PODNamespaceFromFlowTags is the tag used to retrieve flow associated to a particular pod namespace from tags in FlowEvents PODNamespaceFromFlowTags = "@namespace" )
View Source
const ( // ContainerContextIDIndex from influxdb response ContainerContextIDIndex = 1 // ContainerIPAddressIndex from influxdb response ContainerIPAddressIndex = 5 // ContainerTimestampIndex from influxdb response ContainerTimestampIndex = 0 // ContainerTagsIndex from influxdb response ContainerTagsIndex = 6 // ContainerEventIndex from influxdb response ContainerEventIndex = 2 )
View Source
const ( // FlowTimestampIndex from influxdb response FlowTimestampIndex = 0 // FlowSourceIDIndex from influxdb response FlowSourceIDIndex = 12 // FlowSourceIPIndex from influxdb response FlowSourceIPIndex = 13 // FlowDestinationIDIndex from influxdb response FlowDestinationIDIndex = 2 // FlowDestinationIPIndex from influxdb response FlowDestinationIPIndex = 5 // FlowActionIndex from influxdb response FlowActionIndex = 1 // FlowTagsIndex from influxdb response FlowTagsIndex = 16 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerEvents ¶
type ContainerEvents struct {
// contains filtered or unexported fields
}
ContainerEvents struct to hold container event attributes
type FlowEvents ¶
type FlowEvents struct {
// contains filtered or unexported fields
}
FlowEvents struct to hold flow event attributes
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph which holds the fields for graph creation
func (*Graph) FindLinksBetweenGivenTimeAndOrNamespace ¶
func (g *Graph) FindLinksBetweenGivenTimeAndOrNamespace(starttime time.Time, endtime time.Time, namespace string)
FindLinksBetweenGivenTimeAndOrNamespace will aggregate links within the specified time, namespaces or both
func (*Graph) FindNodesBetweenGivenTimeAndOrNamespace ¶
func (g *Graph) FindNodesBetweenGivenTimeAndOrNamespace(starttime time.Time, endtime time.Time, namespace string)
FindNodesBetweenGivenTimeAndOrNamespace will aggregate nodes within the specified time, namespaces or both
func (*Graph) GetData ¶
func (g *Graph) GetData(w http.ResponseWriter, r *http.Request)
GetData is called by the client which generates json with a logic that defines the nodes and links for graph
type GraphData ¶
GraphData is the struct that holds the json format required for graph to generate nodes and link
type Link ¶
type Link struct { Time time.Time `json:"time"` Source string `json:"source"` Target string `json:"target"` Action string `json:"action"` Namespace string `json:"namespace"` }
Link which holds the links between pu's
Click to show internal directories.
Click to hide internal directories.