procutil

package
v1.5.4 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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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