internal

package
v0.0.0-...-c18b433 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileOutputFunc

func FileOutputFunc(filePath string) func(msg string)

FileOutputFunc returns an output function that writes log messages to the specified file path, overwriting the file if it exists.

func Jattach

func Jattach(option JattachOption) int

Jattach performs the attach operation to a Java process specified by the JattachOption.

func JpsList

func JpsList(option JpsOption) int

JpsList returns a list of Java process information for the current or specified user. @see sun.jvmstat.perfdata.monitor.protocol.local.LocalVmManager.activeVms()

Types

type JattachOption

type JattachOption struct {
	User        string
	Pid         string
	AgentPath   string
	AgentParams string
}

func ParseJattachFlags

func ParseJattachFlags(args []string) (JattachOption, error)

ParseJattachFlags parses flags for the "jattach" command and returns the corresponding JattachOption.

func (*JattachOption) JattachValidate

func (opt *JattachOption) JattachValidate() error

JattachValidate validates the JattachOption fields.

type JpsOption

type JpsOption struct {
	User       string
	ShowLong   bool // -l
	ShowVMArgs bool // -v
	ShowArgs   bool // -m
	Quiet      bool // -q
}

func ParseJpsFlags

func ParseJpsFlags(args []string) (JpsOption, error)

ParseJpsFlags parses flags for the "jps" command and returns the corresponding JpsOption.

func (*JpsOption) JpsValidate

func (opt *JpsOption) JpsValidate() error

JpsValidate checks if the JpsOption fields are valid. Currently, it validates the User field if provided.

type JvmProcess

type JvmProcess struct {
	Pid int32
	Cmd string
	user.User
	// contains filtered or unexported fields
}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger is a configurable logging utility. By default, it outputs to the console in a pretty format.

func NewLogger

func NewLogger(outputFunc func(msg string)) *Logger

NewLogger creates a new Logger with the specified output function. If outputFunc is nil, it defaults to pretty console output.

func (*Logger) Print

func (l *Logger) Print(msg string)

Print logs a message using the configured output function.

Jump to

Keyboard shortcuts

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