caasprober

package
v0.0.0-...-9ec3720 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	ErrorProbeNotImplemented = errors.New("probe not implemented")
)

Functions

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

func ProbeHandler

func ProbeHandler(name string, supplier func() Prober) http.Handler

Types

type CAASProbes

type CAASProbes interface {
	LivenessProbe() Prober
	ReadinessProbe() Prober
	StartupProbe() Prober
}

type Controller

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

func NewController

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

func (*Controller) Kill

func (c *Controller) Kill()

func (*Controller) Wait

func (c *Controller) Wait() error

type ManifoldConfig

type ManifoldConfig struct {
	MuxName string
}

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)
}

type ProbeNotImplemented

type ProbeNotImplemented struct{}

func (*ProbeNotImplemented) Probe

func (p *ProbeNotImplemented) Probe() (bool, error)

type ProbeSuccess

type ProbeSuccess struct{}

func (*ProbeSuccess) Probe

func (p *ProbeSuccess) Probe() (bool, error)

type Prober

type Prober interface {
	Probe() (bool, error)
}

type ProberFunc

type ProberFunc func() (bool, error)

func (ProberFunc) Probe

func (p ProberFunc) Probe() (bool, error)

Jump to

Keyboard shortcuts

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