client: unexport HTTPKeysAPI

This commit is contained in:
Brian Waldon 2014-10-24 15:40:54 -07:00
parent 73e48068c2
commit 00dcbf8bf7

View File

@ -49,7 +49,7 @@ func NewDiscoveryKeysAPI(tr *http.Transport, ep string, to time.Duration) (KeysA
return newHTTPKeysAPIWithPrefix(tr, ep, to, "")
}
func newHTTPKeysAPIWithPrefix(tr *http.Transport, ep string, to time.Duration, prefix string) (*HTTPKeysAPI, error) {
func newHTTPKeysAPIWithPrefix(tr *http.Transport, ep string, to time.Duration, prefix string) (*httpKeysAPI, error) {
u, err := url.Parse(ep)
if err != nil {
return nil, err
@ -63,7 +63,7 @@ func newHTTPKeysAPIWithPrefix(tr *http.Transport, ep string, to time.Duration, p
timeout: to,
}
kAPI := HTTPKeysAPI{
kAPI := httpKeysAPI{
client: c,
}
@ -100,11 +100,11 @@ func (n *Node) String() string {
return fmt.Sprintf("{Key: %s, CreatedIndex: %d, ModifiedIndex: %d}", n.Key, n.CreatedIndex, n.ModifiedIndex)
}
type HTTPKeysAPI struct {
type httpKeysAPI struct {
client *httpClient
}
func (k *HTTPKeysAPI) Create(key, val string, ttl time.Duration) (*Response, error) {
func (k *httpKeysAPI) Create(key, val string, ttl time.Duration) (*Response, error) {
create := &createAction{
Key: key,
Value: val,
@ -122,7 +122,7 @@ func (k *HTTPKeysAPI) Create(key, val string, ttl time.Duration) (*Response, err
return unmarshalHTTPResponse(httpresp.StatusCode, body)
}
func (k *HTTPKeysAPI) Get(key string) (*Response, error) {
func (k *httpKeysAPI) Get(key string) (*Response, error) {
get := &getAction{
Key: key,
Recursive: false,
@ -136,7 +136,7 @@ func (k *HTTPKeysAPI) Get(key string) (*Response, error) {
return unmarshalHTTPResponse(httpresp.StatusCode, body)
}
func (k *HTTPKeysAPI) Watch(key string, idx uint64) Watcher {
func (k *httpKeysAPI) Watch(key string, idx uint64) Watcher {
return &httpWatcher{
client: k.client,
nextWait: waitAction{
@ -147,7 +147,7 @@ func (k *HTTPKeysAPI) Watch(key string, idx uint64) Watcher {
}
}
func (k *HTTPKeysAPI) RecursiveWatch(key string, idx uint64) Watcher {
func (k *httpKeysAPI) RecursiveWatch(key string, idx uint64) Watcher {
return &httpWatcher{
client: k.client,
nextWait: waitAction{