Documentation ¶
Overview ¶
Package agent provides hooks programs can register to retrieve diagnostics data by using gops.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶ added in v0.1.0
func Close()
Close closes the agent, removing temporary files and closing the TCP listener. If no agent is listening, Close does nothing.
func Listen ¶ added in v0.1.0
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 ¶ added in v0.1.0
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.