Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoProvider = errors.New("no provider available")
ErrNoProvider is an error returned when no provider is available, typically when the platform is not supported.
Functions ¶
This section is empty.
Types ¶
type ErrAgentLoad ¶
type ErrAgentLoad struct {
*ErrLoad
}
func (*ErrAgentLoad) Error ¶
func (eal *ErrAgentLoad) Error() string
func (*ErrAgentLoad) Unwrap ¶
func (eal *ErrAgentLoad) Unwrap() error
type ErrResponse ¶
func (*ErrResponse) Error ¶
func (er *ErrResponse) Error() string
type Provider ¶
type Provider interface {
// List returns a list of available JVMs that can be attached to.
List() ([]*VMDescriptor, error)
// Attach attaches to a JVM using its descriptor.
Attach(desc *VMDescriptor) (VM, error)
// AttachID attaches to a JVM using its ID (usually the PID).
AttachID(id string) (VM, error)
}
Provider allows you to list and attach to JVMs. You can use the Default() function to get the current platform's provider.
type UnixProvider ¶
type UnixProvider struct {
// contains filtered or unexported fields
}
func (*UnixProvider) Attach ¶
func (up *UnixProvider) Attach(desc *VMDescriptor) (VM, error)
func (UnixProvider) List ¶
func (sp UnixProvider) List() ([]*VMDescriptor, error)
type VM ¶
type VM interface {
io.Closer
// Load loads a Java agent into the attached JVM.
Load(agent string, options string) error
// LoadLibrary loads a Java agent library from the specified path into the attached JVM.
LoadLibrary(path string, absolute bool, options string) error
// Properties retrieves the properties of the attached JVM.
Properties() (map[string]string, error)
// ThreadDump retrieves a thread dump of the attached JVM.
ThreadDump() (string, error)
}
VM represents an attached JVM instance.
type VMDescriptor ¶
type VMDescriptor struct {
// ID is the unique identifier for the JVM instance, usually the PID.
ID string
// DisplayName is a human-readable name for the JVM instance, may be empty, usually the process command line.
DisplayName string
}
VMDescriptor is a descriptor for a JVM that can be attached to.
Click to show internal directories.
Click to hide internal directories.