func (c *endpoint) URL() string {
	c.RLock()
	defer c.RUnlock()
	return c.url
}
URL returns the url string of this endpoint.
package client
import (
	"fmt"
	"sync"
	"time"
)
type nodeType int
const (
	primary nodeType = iota
	secondary
	store
)
type endpoint struct {
	sync.RWMutex
	url       string  
	nodeType  nodeType
	failures  int
	dead      bool
	deadSince *time.Time
}
func newEndpoint(url string, nodeType nodeType) *endpoint {
	return &endpoint{
		url:      url,
		nodeType: nodeType,
	}
}
func (c *endpoint) String() string {
	c.RLock()
	defer c.RUnlock()
	return fmt.Sprintf("%s [type=%v,dead=%v,failures=%d,deadSince=%v]", c.url, c.nodeType, c.dead, c.failures, c.deadSince)
}