Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMatches = map[string]*regexp.Regexp{ "go_test": regexp.MustCompile("(.*)/?go test(.*)"), "go_build": regexp.MustCompile("(.*)/?go build(.*)"), }
Functions ¶
func CreateLabelFromCommand ¶
func CreateLabelFromCommand(cmd *exec.Cmd, cm CmdMatcher) (string, error)
CreateLabelFromCommand takes a command and distills it into a label that we measure. We want to know the command and the package it pertains to.
func FindRepo ¶
func FindRepo(env *CommandEnv) error
func InContainer ¶
InContainer looks in the cgroup and mountinfo to see if there are signs this is running in a container.
Types ¶
type CmdMatcher ¶
type CmdMatcher struct {
// contains filtered or unexported fields
}
func NewCmdMatcher ¶
func NewCmdMatcher(matchers map[string]*regexp.Regexp) CmdMatcher
func (CmdMatcher) FindMatch ¶
func (cm CmdMatcher) FindMatch(cmd string) string
type CommandEnv ¶
func NewCommandEnv ¶
func NewCommandEnv() (*CommandEnv, error)
func (CommandEnv) String ¶
func (ce CommandEnv) String()
type JSONCondition ¶
type JSONCondition struct { Column string `json:"column"` Operator string `json:"operator"` Value string `json:"value"` }
func (JSONCondition) String ¶
func (jc JSONCondition) String() string
type JSONOrderBy ¶
func (JSONOrderBy) String ¶
func (job JSONOrderBy) String() string
type JSONQuery ¶
type JSONQuery struct { Operation string `json:"operation"` Table string `json:"table"` Conditions []JSONCondition `json:"conditions"` OrderBy []JSONOrderBy `json:"orderBy"` }
func NewJSONQueryFromQuery ¶
Click to show internal directories.
Click to hide internal directories.