tag

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerID   = "docker_container_id"
	ContainerName = "docker_container_name"
	ImageID       = "docker_image_id"
	ImageName     = "docker_image_name"
)

These constants are keys used in node metadata TODO: use these constants in report/{mapping.go, detailed_node.go} - pending some circular references

Variables

This section is empty.

Functions

func Apply

func Apply(r report.Report, taggers []Tagger) report.Report

Apply tags the report with all the taggers.

Types

type DockerTagger

type DockerTagger struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

DockerTagger is a tagger that tags Docker container information to process nodes that have a PID.

func NewDockerTagger

func NewDockerTagger(procRoot string, interval time.Duration) (*DockerTagger, error)

NewDockerTagger returns a usable DockerTagger. Don't forget to Stop it.

func (*DockerTagger) ContainerTopology

func (t *DockerTagger) ContainerTopology(scope string) report.Topology

ContainerTopology produces a Toplogy of Containers

func (*DockerTagger) Containers

func (t *DockerTagger) Containers() []*docker.Container

Containers returns the Containers the DockerTagger knows about.

func (*DockerTagger) Stop

func (t *DockerTagger) Stop()

Stop stops the Docker tagger's event subscriber.

func (*DockerTagger) Tag

Tag implements Tagger.

type PIDTree

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

PIDTree represents all processes on the machine.

func NewPIDTree

func NewPIDTree(procRoot string) (*PIDTree, error)

NewPIDTree returns a new PIDTree that can be polled.

func (*PIDTree) ProcessTopology

func (pt *PIDTree) ProcessTopology(hostID string) report.Topology

ProcessTopology returns a process topology based on the current state of the PIDTree.

type Process

type Process struct {
	PID, PPID int
	Comm      string
	// contains filtered or unexported fields
}

Process represents a single process.

type Tagger

type Tagger interface {
	Tag(r report.Report) report.Report
}

Tagger tags nodes with value-add node metadata.

func NewOriginHostTagger

func NewOriginHostTagger(hostID string) Tagger

NewOriginHostTagger tags each node with a foreign key linking it to its origin host in the host topology.

func NewTopologyTagger

func NewTopologyTagger() Tagger

NewTopologyTagger tags each node with the topology that it comes from.

Jump to

Keyboard shortcuts

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