diagnostics

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Executables = []*Executable{
	&Executable{
		Command: we + " who",
	},
	&Executable{
		Description: "Installed version",
		Command:     we + " version",
	},
	&Executable{
		Command: we + " --verbose",
	},
	&Executable{
		Description: "Inspecting working directory context",
		Command:     we + " inspect context",
	},
}

Executables is a list of executables

Functions

func Submit

func Submit(ctx context.Context, entry Entry) (err 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) Run

func (d *Diagnostics) Run(ctx context.Context)

Run 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 {
	Description string
	LogFile     string
	Command     string
	// IgnoreError if command exit code is != 0 (don't log)
	IgnoreError bool
	Required    bool
	// contains filtered or unexported fields
}

Executable is a command to be executed on the diagnostics

func (*Executable) Error

func (e *Executable) Error() error

type Report

type Report map[string][]byte

Report is a map of filename to content

func (*Report) Len

func (r *Report) Len() int

Len returns the number of bytes of a report

func (*Report) String added in v1.0.11

func (r *Report) String() map[string]string

String created from the report

Jump to

Keyboard shortcuts

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