func NewEndpointer(src Instancer, f Factory, logger log.Logger, options ...EndpointerOption) *DefaultEndpointer {
	opts := endpointerOptions{}
	for _, opt := range options {
		opt(&opts)
	}
	se := &DefaultEndpointer{
		cache:     newEndpointCache(f, logger, opts),
		instancer: src,
		ch:        make(chan Event),
	}
	go se.receive()
	src.Register(se.ch)
	return se
}
NewEndpointer creates an Endpointer that subscribes to updates from Instancer src
and uses factory f to create Endpoints. If src notifies of an error, the Endpointer
keeps returning previously created Endpoints assuming they are still good, unless
this behavior is disabled via InvalidateOnError option.
package sd
import (
	"time"
	"github.com/go-kit/kit/endpoint"
	"github.com/go-kit/kit/log"
)
type Endpointer interface {
	Endpoints() ([]endpoint.Endpoint, error)
}
type FixedEndpointer []endpoint.Endpoint
func (s FixedEndpointer) Endpoints() ([]endpoint.Endpoint, error) { return s, nil }