lang

package
v0.0.0-...-316db35 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotDetermined = errors.New("language cannot be determined")
)

Errors

Functions

func ProcessesPerLang

func ProcessesPerLang(ctx context.Context, l log.Logger) map[ID][]*process.Process

ProcessesPerLang returns a list of introspectable processes indexed by language identifier.

Types

type ID

type ID string

ID language unique identifier.

const (
	Unknown ID = "unknown"
	Java    ID = "java"
	Go      ID = "go"
)

Language identifiers.

func GuessLang

func GuessLang(ctx context.Context, p *process.Process) (id ID, err error)

CmdLineGuessFn guess what language a cmdline runs on. fixed error vars are returned:

  • ErrNotDetermined: language cannot be determined this error can also wrap process.ErrorProcessNotRunning when process no longer exists

func (ID) IntegrationName

func (i ID) IntegrationName() string

IntegrationName generates the expected language specific introspection integration name.

Jump to

Keyboard shortcuts

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