client: NewDiscoveryKeysAPI -> NewKeysAPIWithPrefix

This commit is contained in:
Brian Waldon 2015-01-27 13:31:57 -08:00 committed by Yicheng Qin
parent 89070fd237
commit 88cea415a7
2 changed files with 4 additions and 7 deletions

View File

@ -40,16 +40,13 @@ var (
)
func NewKeysAPI(c Client) KeysAPI {
return &httpKeysAPI{
client: c,
prefix: defaultV2KeysPrefix,
}
return NewKeysAPIWithPrefix(c, defaultV2KeysPrefix)
}
func NewDiscoveryKeysAPI(c Client) KeysAPI {
func NewKeysAPIWithPrefix(c Client, p string) KeysAPI {
return &httpKeysAPI{
client: c,
prefix: "",
prefix: p,
}
}

View File

@ -125,7 +125,7 @@ func newDiscovery(durl, dproxyurl string, id types.ID) (*discovery, error) {
if err != nil {
return nil, err
}
dc := client.NewDiscoveryKeysAPI(c)
dc := client.NewKeysAPIWithPrefix(c, "")
return &discovery{
cluster: token,
c: dc,