external

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: Apache-2.0 Imports: 17 Imported by: 10

Documentation

Overview

Package external implements an external probe type for cloudprober.

External probe type executes an external process for actual probing. These probes can have two modes: "once" and "server". In "once" mode, the external process is started for each probe run cycle, while in "server" mode, external process is started only if it's not running already and Cloudprober communicates with it over stdin/stdout for each probe cycle.

TODO(manugarg): Add a way to test this program. Write another program that implements the probe server protocol and use that for testing.

Index

Constants

This section is empty.

Variables

View Source
var (
	// TimeBetweenRequests is the time interval between probe requests for
	// multiple targets. In server mode, probe requests for multiple targets are
	// sent to the same external probe process. Sleeping between requests provides
	// some time buffer for the probe process to dequeue the incoming requests and
	// avoids filling up the communication pipe.
	//
	// Note that this value impacts the effective timeout for a target as timeout
	// is applied for all the targets in aggregate. For example, 100th target in
	// the targets list will have the effective timeout of (timeout - 1ms).
	// TODO(manugarg): Make sure that the last target in the list has an impact of
	// less than 1% on its timeout.
	TimeBetweenRequests = 10 * time.Microsecond
)

Functions

This section is empty.

Types

type Probe

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

Probe holds aggregate information about all probe runs, per-target.

func (*Probe) Init

func (p *Probe) Init(name string, opts *options.Options) error

Init initializes the probe with the given params.

func (*Probe) Start

func (p *Probe) Start(ctx context.Context, dataChan chan *metrics.EventMetrics)

Start starts and runs the probe indefinitely.

Directories

Path Synopsis
This program implements a stand-alone external prober binary using the cloudprober/probes/external package.
This program implements a stand-alone external prober binary using the cloudprober/probes/external package.
Package serverutils provides utilities to work with the cloudprober's external probe.
Package serverutils provides utilities to work with the cloudprober's external probe.

Jump to

Keyboard shortcuts

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