pool

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package pool provides an application load balancer pool

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool interface {
	// Healthy returns the full list of Healthy Targets as http.Handlers
	Healthy() []http.Handler
	// HealthyTargets returns the full list of Healthy Targets as *Targets
	HealthyTargets() Targets
	// SetHealthy sets the Healthy Targets List
	SetHealthy([]http.Handler)
	// Stop stops the pool and its health checker goroutines
	Stop()
	// RefreshHealthy forces a refresh of the pool's healthy handlers list
	RefreshHealthy()
}

Pool defines the interface for a load balancer pool

func New

func New(targets Targets, healthyFloor int) Pool

New returns a new Pool

type Target

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

Target defines an alb pool target

func NewTarget

func NewTarget(handler http.Handler, hcStatus *healthcheck.Status,
	backend backends.Backend,
) *Target

NewTarget returns a new Target using the provided inputs

func (*Target) Backend

func (t *Target) Backend() backends.Backend

func (*Target) Handler

func (t *Target) Handler() http.Handler

func (*Target) HealthStatus

func (t *Target) HealthStatus() *healthcheck.Status

type Targets

type Targets []*Target

Jump to

Keyboard shortcuts

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