detectors

package
v0.0.0-...-cba18c7 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoDetector

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

func NewGoDetector

func NewGoDetector() GoDetector

func (GoDetector) DetectLanguage

func (d GoDetector) DetectLanguage(process languagemodels.Process) (languagemodels.Language, error)

DetectLanguage allows for detecting if a process is a go process, and its version. Note that currently the goDetector only returns non-retriable errors since in all cases we will not be able to detect the language. Scenarios in which we can return an error:

  • Program exits early, and we fail to call `elf.Open`. Note that in the future it may be possible to lock the directory using a system call.
  • Program is not a go binary, or has build tags stripped out. In this case we return a `dderrors.NotFound`.

type JRubyDetector

type JRubyDetector struct{}

JRubyDetector is a languagedetection.Detector that detects JRuby processes

func (JRubyDetector) DetectLanguage

func (d JRubyDetector) DetectLanguage(process languagemodels.Process) (languagemodels.Language, error)

Jump to

Keyboard shortcuts

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