Codebase list golang-github-go-kit-kit / dff50435-7a33-4f0c-bbdc-f455eb10d80a/v0.5.0 sd / lb / balancer.go
dff50435-7a33-4f0c-bbdc-f455eb10d80a/v0.5.0

Tree @dff50435-7a33-4f0c-bbdc-f455eb10d80a/v0.5.0 (Download .tar.gz)

balancer.go @dff50435-7a33-4f0c-bbdc-f455eb10d80a/v0.5.0raw · history · blame

package lb

import (
	"errors"

	"github.com/go-kit/kit/endpoint"
)

// Balancer yields endpoints according to some heuristic.
type Balancer interface {
	Endpoint() (endpoint.Endpoint, error)
}

// ErrNoEndpoints is returned when no qualifying endpoints are available.
var ErrNoEndpoints = errors.New("no endpoints available")