discovery

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabelsToMap

func LabelsToMap(prefix string, labels map[string]string) data.Map

Types

type Command

type Command struct {
	Exec        ShlexOpt          `yaml:"exec"`
	Environment map[string]string `yaml:"env"`
	Matcher     map[string]string `yaml:"match"`
	Timeout     time.Duration     `yaml:"timeout"`
}

func (*Command) Validate

func (c *Command) Validate() error

type Container

type Container struct {
	Match      map[string]string `yaml:"match"`
	ApiVersion string            `yaml:"api_version"` // for docker client
}

Container discovery parameters

func (*Container) Validate

func (d *Container) Validate() error

type Discovery

type Discovery struct {
	Variables         data.Map             `json:"variables"`
	MetricAnnotations data.InterfaceMap    `json:"annotations"`
	EntityRewrites    []data.EntityRewrite `json:"entityRewrites"`
}

type FieldsMatcher

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

func NewMatcher

func NewMatcher(fieldMatchers map[string]string) (FieldsMatcher, error)

func (*FieldsMatcher) All

func (cm *FieldsMatcher) All(fields map[string]string) bool

type ShlexOpt

type ShlexOpt []string

ShlexOpt is a wrapper around []string so we can use go-shlex for shell tokenizing

func (*ShlexOpt) Set

func (s *ShlexOpt) Set(value string) error

Set the value

func (*ShlexOpt) String

func (s *ShlexOpt) String() string

func (*ShlexOpt) Type

func (s *ShlexOpt) Type() string

Type returns the type of the value

func (*ShlexOpt) UnmarshalYAML

func (s *ShlexOpt) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*ShlexOpt) Value

func (s *ShlexOpt) Value() []string

Value returns the value as a string slice

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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