install

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InstallationFileName = "pyroscope_test.go"
)

Variables

TODO: maybe upstream should export this?

Functions

func FindCandidateFiles added in v1.3.0

func FindCandidateFiles(basePath string) (map[string]InstallationCandidate, error)

FindCandidateFiles finds files candidate for installation

func Install

func Install(basePath string, appName string, profileTypes []string) error

Install Install the pyroscope agent into test packages It does that by recursively finding packages with tests Then it generates a `pyroscope_test.go` file for each package With the profile type and app name specified

func ProfileTypesToCode

func ProfileTypesToCode(p string) ([]string, error)

ProfileTypesToCode converts ProfileTypes flags into the name it's used in the agent code TODO: unify this with upstream https://github.com/pyroscope-io/client/blob/46ac3c0a285626dbf2ef17e017fae2e1b985ee12/pyroscope/types.go#L14-L26

func Uninstall added in v1.3.0

func Uninstall(basePath string) (map[string]InstallationCandidate, error)

Uninstall deletes the files generated by Install It returns the list of files that have been actually deleted

Types

type InstallationCandidate added in v1.3.0

type InstallationCandidate struct {
	Path        string
	PackageName string
}

Jump to

Keyboard shortcuts

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