Documentation ¶
Overview ¶
Package options provides a shared interface to common probe options.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalLabel ¶ added in v0.10.5
type AdditionalLabel struct { Key string Value string // static value TargetLabelKey string // from target // This map will allow for quick label lookup for a target. It will be // updated by the probe while updating targets. LabelForTarget map[string]string }
AdditionalLabel encapsulates additional labels to attach to probe results.
func (*AdditionalLabel) KeyValueForTarget ¶ added in v0.10.5
func (al *AdditionalLabel) KeyValueForTarget(targetName string) (key, val string)
KeyValueForTarget returns key, value pair for the given target.
func (*AdditionalLabel) UpdateForTarget ¶ added in v0.10.5
func (al *AdditionalLabel) UpdateForTarget(targetName string, targetLabels map[string]string)
UpdateForTarget updates target-based label's value.
type Options ¶
type Options struct { Targets targets.Targets Interval, Timeout time.Duration Logger *logger.Logger ProbeConf interface{} // Probe-type specific config LatencyDist *metrics.Distribution LatencyUnit time.Duration Validators []*validators.Validator SourceIP net.IP IPVersion int StatsExportInterval time.Duration LogMetrics func(*metrics.EventMetrics) AdditionalLabels []*AdditionalLabel }
Options encapsulates common probe options.
func BuildProbeOptions ¶ added in v0.10.2
func BuildProbeOptions(p *configpb.ProbeDef, ldLister lameduck.Lister, globalTargetsOpts *targetspb.GlobalTargetsOptions, l *logger.Logger) (*Options, error)
BuildProbeOptions builds probe's options using the provided config and some global params.
func DefaultOptions ¶ added in v0.10.6
func DefaultOptions() *Options
DefaultOptions returns default options, capturing default values for the various fields.
Click to show internal directories.
Click to hide internal directories.