diagnostics

package
v1.0.0-alpha-92 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Executables = []*Executable{
	&Executable{
		name: we,
		arg:  []string{"who"},
	},
	&Executable{
		name: we,
		arg:  []string{"version"},
	},
	&Executable{
		name: we,
		arg:  []string{"remote", "-v"},
	},
	&Executable{
		name: we,
		arg:  []string{"inspect", "context"},
	},
	&Executable{
		appendTo: "docker_images",
		name:     "docker",
		arg:      []string{"images"},
	},
	&Executable{
		appendTo: "docker_ps",
		name:     "docker",
		arg:      []string{"ps"},
	},
	&Executable{
		appendTo: "docker_info",
		name:     "docker",
		arg:      []string{"info"},
	},
	&Executable{
		appendTo: "docker_network",
		name:     "docker",
		arg:      []string{"network", "ls"},
	},
	&Executable{
		appendTo: "docker_network",
		name:     "docker",
		arg:      []string{"network", "inspect", "bridge"},
	},
}

Executables is a list of executables

Functions

func Submit

func Submit(ctx context.Context, entry Entry) error

Submit diagnostics

func Write

func Write(w io.Writer, r Report)

Write report

Types

type Diagnostics

type Diagnostics struct {
	Timeout     time.Duration
	Executables []*Executable
	Serial      bool
	// contains filtered or unexported fields
}

Diagnostics for the CLI and environment

func (*Diagnostics) Collect

func (d *Diagnostics) Collect() Report

Collect diagnostics

func (*Diagnostics) Start

Start diagnostics

type Entry

type Entry struct {
	ID       string `json:"id"`
	Username string `json:"username"`
	Report   Report `json:"report"`
}

Entry for the diagnostics endpoint

type Executable

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

Executable is a command to be executed on the diagnostics

func (*Executable) Error

func (e *Executable) Error() error

func (*Executable) Program

func (e *Executable) Program() string

Program is the name of the program + arguments

type Report

type Report map[string][]byte

Report is a map of filename to content

Jump to

Keyboard shortcuts

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