builder

package
v0.0.0-...-3ea6822 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationsPrefix   = "synthetics.grafana.com/"
	EnabledAnnotation   = AnnotationsPrefix + "enabled"
	NameAnnotation      = AnnotationsPrefix + "name"
	FrequencyAnnotation = AnnotationsPrefix + "frequency"
	TimeoutAnnotation   = AnnotationsPrefix + "timeout"
	ProbesAnnotation    = AnnotationsPrefix + "probes"
	HostAnnotation      = AnnotationsPrefix + "host" // TODO
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func NewBuilder

func NewBuilder(opts Options) Builder

func (*Builder) Build

func (b *Builder) Build(services []*coreV1.Service, ingresses []*networkingV1.Ingress) (checks []*sm.Check, warnings []Warning)

type CheckOptions

type CheckOptions struct {
	// These translate directly to check fields:
	Enabled   bool
	JobName   string
	Frequency int64
	Timeout   int64
	Labels    []sm.Label
	Probes    []string

	// These are modifiers:
	Host   string
	Target string
}

type Options

type Options struct {
	// TODO: Config options for how the checks are built
	ClusterName string
	Labels      []sm.Label
	// contains filtered or unexported fields
}

func NewOptions

func NewOptions() Options

func (*Options) NewCheckOptions

func (opt *Options) NewCheckOptions(annotations map[string]string) (opts CheckOptions)

type Warning

type Warning struct {
	Cause error
	Objs  []schema.Object
}

Jump to

Keyboard shortcuts

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