Documentation
¶
Index ¶
Constants ¶
View Source
const ( PodID = "kubernetes_pod_id" PodName = "kubernetes_pod_name" PodCreated = "kubernetes_pod_created" PodContainerIDs = "kubernetes_pod_container_ids" PodState = "kubernetes_pod_state" ServiceIDs = "kubernetes_service_ids" )
These constants are keys used in node metadata
View Source
const ( ServiceID = "kubernetes_service_id" ServiceName = "kubernetes_service_name" ServiceCreated = "kubernetes_service_created" )
These constants are keys used in node metadata
View Source
const (
Namespace = "kubernetes_namespace"
)
These constants are keys used in node metadata
Variables ¶
View Source
var ( PodMetadataTemplates = report.MetadataTemplates{ PodID: {ID: PodID, Label: "ID", From: report.FromLatest, Priority: 1}, PodState: {ID: PodState, Label: "State", From: report.FromLatest, Priority: 2}, Namespace: {ID: Namespace, Label: "Namespace", From: report.FromLatest, Priority: 3}, PodCreated: {ID: PodCreated, Label: "Created", From: report.FromLatest, Priority: 4}, } ServiceMetadataTemplates = report.MetadataTemplates{ ServiceID: {ID: ServiceID, Label: "ID", From: report.FromLatest, Priority: 1}, Namespace: {ID: Namespace, Label: "Namespace", From: report.FromLatest, Priority: 2}, ServiceCreated: {ID: ServiceCreated, Label: "Created", From: report.FromLatest, Priority: 3}, } )
Exposed for testing
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Stop()
WalkPods(f func(Pod) error) error
WalkServices(f func(Service) error) error
}
Client keeps track of running kubernetes pods and services
type Pod ¶
type Pod interface {
ID() string
Name() string
Namespace() string
ContainerIDs() []string
Created() string
AddServiceID(id string)
Labels() labels.Labels
GetNode() report.Node
}
Pod represents a Kubernetes pod
Source Files
¶
- client.go
- pod.go
- reporter.go
- service.go
Click to show internal directories.
Click to hide internal directories.