Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = log.New(ioutil.Discard, "[D2] ", log.Ldate|log.Ltime|log.Lmicroseconds|log.Lshortfile|log.LUTC)
Functions ¶
func ClustersPath ¶ added in v0.1.1
func EnableD2Logging ¶ added in v0.1.1
func EnableD2Logging()
func ServicesPath ¶
Types ¶
type ChildUpdateCallback ¶
type ChildWatcher ¶
func NewChildWatcher ¶
func NewChildWatcher(conn *zk.Conn, root string, callback ChildUpdateCallback) (*ChildWatcher, error)
func (*ChildWatcher) ChildPath ¶
func (w *ChildWatcher) ChildPath(child string) string
type Cluster ¶ added in v0.1.1
type Cluster struct { ClusterName string `json:"clusterName"` PartitionProperties struct { HashAlgorithm string `json:"hashAlgorithm"` PartitionCount int `json:"partitionCount"` PartitionKeyRegex string `json:"partitionKeyRegex"` PartitionType string `json:"partitionType"` } `json:"partitionProperties"` }
type FixedClient ¶ added in v0.1.1
func NewFixedClient ¶ added in v0.1.1
func NewFixedClient(name string, conn *zk.Conn) (c *FixedClient, err error)
func (*FixedClient) GetHostnameForQuery ¶ added in v0.1.1
func (c *FixedClient) GetHostnameForQuery(query string) (*url.URL, error)
type Uri ¶
type Uri struct { Weights map[url.URL]float64 ClusterName string Properties map[url.URL]UriProperty PartitionDesc map[url.URL]map[int]float64 }
func (*Uri) UnmarshalJSON ¶
type UriProperty ¶
Click to show internal directories.
Click to hide internal directories.