support

package
v2.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent added in v2.10.0

type Agent struct {
	Agent               *codersdk.WorkspaceAgent                       `json:"agent"`
	ListeningPorts      *codersdk.WorkspaceAgentListeningPortsResponse `json:"listening_ports"`
	Logs                []byte                                         `json:"logs"`
	ClientMagicsockHTML []byte                                         `json:"client_magicsock_html"`
	AgentMagicsockHTML  []byte                                         `json:"agent_magicsock_html"`
	Manifest            *agentsdk.Manifest                             `json:"manifest"`
	PeerDiagnostics     *tailnet.PeerDiagnostics                       `json:"peer_diagnostics"`
	PingResult          *ipnstate.PingResult                           `json:"ping_result"`
	Prometheus          []byte                                         `json:"prometheus"`
	StartupLogs         []codersdk.WorkspaceAgentLog                   `json:"startup_logs"`
}

func AgentInfo added in v2.10.0

func AgentInfo(ctx context.Context, client *codersdk.Client, log slog.Logger, agentID uuid.UUID) Agent

type Bundle

type Bundle struct {
	Deployment Deployment `json:"deployment"`
	Network    Network    `json:"network"`
	Workspace  Workspace  `json:"workspace"`
	Agent      Agent      `json:"agent"`
	Logs       []string   `json:"logs"`
	CLILogs    []byte     `json:"cli_logs"`
}

Bundle is a set of information discovered about a deployment. Even though we do attempt to sanitize data, it may still contain sensitive information and should thus be treated as secret.

func Run

func Run(ctx context.Context, d *Deps) (*Bundle, error)

Run generates a support bundle with the given dependencies.

type Deployment

type Deployment struct {
	BuildInfo    *codersdk.BuildInfoResponse  `json:"build"`
	Config       *codersdk.DeploymentConfig   `json:"config"`
	Experiments  codersdk.Experiments         `json:"experiments"`
	HealthReport *healthsdk.HealthcheckReport `json:"health_report"`
}

func DeploymentInfo

func DeploymentInfo(ctx context.Context, client *codersdk.Client, log slog.Logger) Deployment

type Deps

type Deps struct {
	// Source from which to obtain information.
	Client *codersdk.Client
	// Log is where to log any informational or warning messages.
	Log slog.Logger
	// WorkspaceID is the optional workspace against which to run connection tests.
	WorkspaceID uuid.UUID
	// AgentID is the optional agent ID against which to run connection tests.
	// Defaults to the first agent of the workspace, if not specified.
	AgentID uuid.UUID
}

Deps is a set of dependencies for discovering information

type Network

type Network struct {
	CoordinatorDebug string                            `json:"coordinator_debug"`
	TailnetDebug     string                            `json:"tailnet_debug"`
	Netcheck         *workspacesdk.AgentConnectionInfo `json:"netcheck"`
}

func NetworkInfo

func NetworkInfo(ctx context.Context, client *codersdk.Client, log slog.Logger, agentID uuid.UUID) Network

type Workspace

type Workspace struct {
	Workspace          codersdk.Workspace                 `json:"workspace"`
	Parameters         []codersdk.WorkspaceBuildParameter `json:"parameters"`
	Template           codersdk.Template                  `json:"template"`
	TemplateVersion    codersdk.TemplateVersion           `json:"template_version"`
	TemplateFileBase64 string                             `json:"template_file_base64"`
	BuildLogs          []codersdk.ProvisionerJobLog       `json:"build_logs"`
}

func WorkspaceInfo

func WorkspaceInfo(ctx context.Context, client *codersdk.Client, log slog.Logger, workspaceID uuid.UUID) Workspace

Jump to

Keyboard shortcuts

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