Codebase list golang-github-go-kit-kit / 50036860-5a95-4bf4-b155-667a95eed3d7/main sd / lb / balancer.go
50036860-5a95-4bf4-b155-667a95eed3d7/main

Tree @50036860-5a95-4bf4-b155-667a95eed3d7/main (Download .tar.gz)

balancer.go @50036860-5a95-4bf4-b155-667a95eed3d7/mainraw · 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")