func (t *Transport) SetEndpoints(endpoints []string) {
	t.setEndpoints(endpoints)
	t.triggerEvent()
}
SetEndpoints sets current list of endpoints. This will override the list
returned by the serverset. An event by the serverset will override these values.
This should be used to take advantage of the round robin features of this library without a serverset.Watch.
package httpset
import (
	"net/http"
	"sync/atomic"
	"time"
)
type Transport struct {
	Watcher
	UseHTTPS bool  
	BaseTransport http.RoundTripper
	LastEvent  time.Time
	EventCount int
	event     chan struct{}
	count     int64
	endpoints []string
}
func NewTransport(watch Watcher) *Transport {
	t := &Transport{
		Watcher: watch,
		event:   make(chan struct{}, 1),
	}
	if watch != nil {
		t.setEndpoints(watch.Endpoints())
		go func() {
			for {
				select {
				case <-watch.Event():
					t.SetEndpoints(watch.Endpoints())
				}
				if watch.IsClosed() {
					break
				}
			}
			watcherClosed()
		}()
	}
	return t
}
var watcherClosed = func() {}
func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
	err := t.replaceHost(req)
	if err != nil {
		return nil, err
	}
	if t.BaseTransport == nil {
		return http.DefaultTransport.RoundTrip(req)
	}
	return t.BaseTransport.RoundTrip(req)
}
func (t *Transport) replaceHost(req *http.Request) error {
	host, err := t.RotateEndpoint()
	if err != nil {
		return err
	}
	req.URL.Host = host
	if req.URL.Scheme == "" {
		if t.UseHTTPS {
			req.URL.Scheme = "https"
		} else {
			req.URL.Scheme = "http"
		}
	}
	return nil
}
func (t *Transport) Endpoints() []string {
	return t.endpoints
}
func (t *Transport) Event() <-chan struct{} {
	return t.event
}