kubernetes

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2015 License: Apache-2.0 Imports: 8 Imported by: 57

Documentation

Index

Constants

View Source
const (
	PodID           = "kubernetes_pod_id"
	PodName         = "kubernetes_pod_name"
	PodCreated      = "kubernetes_pod_created"
	PodContainerIDs = "kubernetes_pod_container_ids"
	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

This section is empty.

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

func NewClient

func NewClient(addr string, resyncPeriod time.Duration) (Client, error)

NewClient returns a usable Client. Don't forget to Stop it.

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

func NewPod

func NewPod(p *api.Pod) Pod

NewPod creates a new Pod

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter generate Reports containing Container and ContainerImage topologies

func NewReporter

func NewReporter(client Client) *Reporter

NewReporter makes a new Reporter

func (Reporter) Name added in v0.10.0

func (Reporter) Name() string

Name of this reporter, for metrics gathering

func (*Reporter) Report

func (r *Reporter) Report() (report.Report, error)

Report generates a Report containing Container and ContainerImage topologies

type Service

type Service interface {
	ID() string
	Name() string
	Namespace() string
	GetNode() report.Node
	Selector() labels.Selector
}

Service represents a Kubernetes service

func NewService

func NewService(s *api.Service) Service

NewService creates a new Service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL