introspection

package
v0.0.0-...-6cf1bc9 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2016 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package introspection defines the worker that can report internal agent state through the use of a machine local socket.

The most interesting endpoints at this stage are: * `/debug/pprof/goroutine?debug=1`

  • prints out all the goroutines in the agent

* `/debug/pprof/heap?debug=1`

  • prints out the heap profile

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWorker

func NewWorker(config Config) (worker.Worker, error)

NewWorker starts an http server listening on an abstract domain socket which will be created with the specified name.

func WriteProfileFunctions

func WriteProfileFunctions() error

WriteProfileFunctions writes the bashFuncs below to a file in the /etc/profile.d directory so all bash terminals can easily access the introspection worker.

Types

type Config

type Config struct {
	SocketName string
	Reporter   DepEngineReporter
}

Config describes the arguments required to create the introspection worker.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks the config values to assert they are valid to create the worker.

type DepEngineReporter

type DepEngineReporter interface {
	// Report returns a map describing the state of the receiver. It is expected
	// to be goroutine-safe.
	Report() map[string]interface{}
}

DepEngineReporter provides insight into the running dependency engine of the agent.

Directories

Path Synopsis
Package pprof is a fork of net/http/pprof modified to communicate over a unix socket.
Package pprof is a fork of net/http/pprof modified to communicate over a unix socket.

Jump to

Keyboard shortcuts

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