jvm

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ClasspathExcludes   = []string{"IntelliJ IDEA", "surefirebooter", "Eclipse"}
	CommandlineExcludes = []string{
		"JetBrains Toolbox.app",
		"IntelliJ IDEA",
		"com.intellij.idea.Main",
		"jetbrains.buildServer.agent.Launcher",
		"jetbrains.buildServer.agent.AgentMain",
		"org.jetbrains.jps.cmdline.BuildMain",
		"org.jetbrains.idea.maven.server.RemoteMavenServer",
		"org.jetbrains.jps.cmdline.Launcher",
		"org.jetbrains.plugins.scala.nailgun.NailgunRunner",
		"sun.tools.",
		"com.steadybit.javaagent.ExternalJavaagentAttachment",
		"steadybit.agent.disable-jvm-attachment",
		"-XX:+DisableAttachMechanism",
		"-XX:-EnableDynamicAgentLoading",
		"-Dcom.ibm.tools.attach.enable=no",
		"com.steadybit.agent.application.SteadybitAgentApplication",
		"SteadybitPlatformApplication",
	}
)
View Source
var ErrorNotAttachable = errors.New("not attachable")

Functions

func GetCleanSocketCommandResult added in v1.2.0

func GetCleanSocketCommandResult(response io.Reader) (string, error)

Types

type AttachListener added in v1.2.0

type AttachListener interface {
	Attached(javaVm JavaVm)
	Detached(javaVm JavaVm)
}

type Attachment added in v1.2.0

type Attachment interface {
	GetHostAddress() string
	// contains filtered or unexported methods
}

func GetAttachment added in v1.2.0

func GetAttachment(jvm JavaVm) Attachment

type JavaFacade added in v1.2.0

type JavaFacade interface {
	Start()
	Stop()
	AddAttachedListener(AttachedListener AttachListener)
	RemoveAttachedListener(AttachedListener AttachListener)
	LoadAgentPlugin(javaVm JavaVm, plugin string, args string) error
	UnloadAgentPlugin(javaVm JavaVm, plugin string) error
	HasAgentPlugin(javaVm JavaVm, plugin string) bool
	HasClassLoaded(javaVm JavaVm, className string) bool
	SendCommandToAgent(javaVm JavaVm, command string, args string) (bool, error)
	SendCommandToAgentWithHandler(javaVm JavaVm, command string, args string, handler func(response io.Reader) (any, error)) (any, error)
	SendCommandToAgentWithTimeout(javaVm JavaVm, command string, args string, timeout time.Duration) (bool, error)
	AddAutoloadAgentPlugin(plugin string, markerClass string)
	RemoveAutoloadAgentPlugin(plugin string, markerClass string)
	GetJvm(pid int32) JavaVm
	GetJvms() []JavaVm
}

func NewJavaFacade added in v1.2.0

func NewJavaFacade() JavaFacade

type JavaProcessInspector added in v1.2.0

type JavaProcessInspector struct {
	JavaVms <-chan JavaVm
	// contains filtered or unexported fields
}

func (*JavaProcessInspector) Inspect added in v1.2.0

func (i *JavaProcessInspector) Inspect(p *process.Process, retries int, source string)

func (*JavaProcessInspector) Start added in v1.2.0

func (i *JavaProcessInspector) Start()

func (*JavaProcessInspector) Stop added in v1.2.0

func (i *JavaProcessInspector) Stop()

type JavaVm

type JavaVm interface {
	Pid() int32
	CommandLine() string
	MainClass() string
	ClassPath() string
	UserId() string
	GroupId() string
	Path() string
	Hostname() string
	HostFQDN() string
	IsRunning() bool
	ToInfoString() string
	ToDebugString() string
	CreateTime() time.Time
	VmArgs() string
}

type JavaVmInContainer added in v1.2.0

type JavaVmInContainer interface {
	JavaVm
	ContainerId() string
	PidInContainer() int32
}

type LogMessage added in v1.2.0

type LogMessage struct {
	Level      string `json:"level"`
	Msg        string `json:"msg"`
	Stacktrace string `json:"stacktrace"`
	Pid        string `json:"pid"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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