procutil

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindImposterProcesses

func FindImposterProcesses(matcher ProcessMatcher) ([]engine.ManagedMock, error)

FindImposterProcesses finds all imposter processes matching the given matcher

func ReadArg

func ReadArg(cmdline []string, longArg string, shortArg string) string

ReadArg parses the command line arguments to find the value of a given argument

func StopManagedProcesses

func StopManagedProcesses(matcher ProcessMatcher) (int, error)

StopManagedProcesses stops all processes matching the given matcher

Types

type ProcessMatcher

type ProcessMatcher struct {
	// ProcessName is the name of the process to match (e.g., "java" or "imposter")
	ProcessName string
	// CommandPattern is a regex pattern to match against command line arguments
	CommandPattern string
	// GetPort is a function that determines the port from command line arguments
	GetPort func(cmdline []string, env []string) int
}

ProcessMatcher defines how to identify a specific type of imposter process

Jump to

Keyboard shortcuts

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