caasprober

package
v0.0.0-...-298751d Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DetailedResponseQueryKey = "detailed"
	PathLivenessProbe        = "/liveness"
	PathReadinessProbe       = "/readiness"
	PathStartupProbe         = "/startup"
)

Variables

This section is empty.

Functions

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

func ProbeHandler

func ProbeHandler(name string, aggProbe *probe.Aggregate) http.Handler

ProbeHandler implements a http handler for the supplied probe and probe name.

Types

type CAASProbes

type CAASProbes struct {
	Liveness  *probe.Aggregate
	Readiness *probe.Aggregate
	Startup   *probe.Aggregate
}

CaasProbes provides a private internal implementation of CAASProbes.

func NewCAASProbes

func NewCAASProbes() *CAASProbes

NewCAASProbes is responsible for constructing a new CAASProbes struct with its members initialised.

type Controller

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

func NewController

func NewController(probes *CAASProbes, mux Mux) (*Controller, error)

NewController constructs a new caas prober Controller.

func (*Controller) Kill

func (c *Controller) Kill()

Kill implements worker.Kill

func (*Controller) Wait

func (c *Controller) Wait() error

Wait implements worker.Wait

type ManifoldConfig

type ManifoldConfig struct {
	// MuxName is the name of http api server used to register the probe
	// endpoints for this worker.
	MuxName string

	// DefaultProviders is a list of probe providers that are given to this
	// worker at instantiation and not fetched from the dependency engine.
	DefaultProviders map[string]probe.ProbeProvider

	// Providers is a list of worker providers that can offer one of the Prober
	// interfaces to be registered in this worker. Expects at least one of
	// LivenessProber, ReadinessProber or StartupProber.
	Providers []string
}

ManifoldConfig is the configuration used to setup a new caasprober.

func (ManifoldConfig) Start

func (c ManifoldConfig) Start(context dependency.Context) (worker.Worker, error)

func (ManifoldConfig) Validate

func (c ManifoldConfig) Validate() error

type Mux

type Mux interface {
	AddHandler(string, string, http.Handler) error
	RemoveHandler(string, string)
}

Jump to

Keyboard shortcuts

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