agent

package
v0.14.14 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package agent provides hooks programs can register to retrieve diagnostics data by using the Ziti CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close closes the agent, removing temporary files and closing the TCP listener. If no agent is listening, Close does nothing.

func Listen

func Listen(opts Options) error

Listen starts the gops agent on a host process. Once agent started, users can use the advanced gops features. The agent will listen to Interrupt signals and exit the process, if you need to perform further work on the Interrupt signal use the options parameter to configure the agent accordingly.

Note: The agent exposes an endpoint via a TCP connection that can be used by any program on the system. Review your security requirements before starting the agent.

Types

type Options

type Options struct {
	// Addr is the host:port the agent will be listening at.
	// Optional.
	Addr string

	// ConfigDir is the directory to store the configuration file,
	// PID of the gops process, filename, port as well as content.
	// Optional.
	ConfigDir string

	// ShutdownCleanup automatically cleans up resources if the
	// running process receives an interrupt. Otherwise, users
	// can call Close before shutting down.
	// Optional.
	ShutdownCleanup bool
}

Options allows configuring the started agent.

Jump to

Keyboard shortcuts

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