Documentation
¶
Index ¶
- Constants
- type Callbacks
- type Controller
- type ControllerCache
- type Heartbeat
- type NewOption
- func WithCompiler(comp *compile.Compiler) NewOption
- func WithExchange(e *events.Exchange) NewOption
- func WithHeartBeatInterval(every time.Duration) NewOption
- func WithHeartBeatTimeout(timeout time.Duration) NewOption
- func WithLogger(l logger.Logger) NewOption
- func WithRuntime(runtime *proxyv2.RuntimeStore) NewOption
Constants ¶
View Source
const ( BackendHealthy = "Healthy" BackendUnhealthy = "Unhealthy" BackendUnknown = "Unknown" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callbacks ¶
type Callbacks struct {
OnSuccess func(be *proxy.BackendRuntime) error
OnFailure func(be *proxy.BackendRuntime, err error) error
}
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func (*Controller) NewHeartbeat ¶
func (c *Controller) NewHeartbeat(name, kind string, be *backendv1.Probe, target *proxy.BackendRuntime, cb *Callbacks) *Heartbeat
func (*Controller) Run ¶
func (c *Controller) Run(ctx context.Context)
type ControllerCache ¶
type Heartbeat ¶
type Heartbeat struct {
Name string
Kind string
Runtime *proxy.BackendRuntime
Path string
Timeout time.Duration
Period time.Duration
InitialDelay time.Duration
FailureThreshold uint64
SuccessThreshold uint64
Logger logger.Logger
FailureCount atomic.Uint64
SuccessCount atomic.Uint64
Callbacks Callbacks
// contains filtered or unexported fields
}
type NewOption ¶
type NewOption func(c *Controller)
func WithCompiler ¶
func WithExchange ¶
func WithHeartBeatInterval ¶
func WithHeartBeatTimeout ¶
func WithLogger ¶
func WithRuntime ¶
func WithRuntime(runtime *proxyv2.RuntimeStore) NewOption
Click to show internal directories.
Click to hide internal directories.