@@ -42,6 +42,10 @@ type httpAction interface {
httpRequest(url.URL) *http.Request
}
+type httpActionDo interface {
+ do(context.Context, httpAction) (int, []byte, error)
+}
+
type roundTripResponse struct {
resp *http.Response
err error
@@ -100,7 +100,7 @@ func (n *Node) String() string {
type httpKeysAPI struct {
- client *httpClient
+ client httpActionDo
prefix string
timeout time.Duration
@@ -168,7 +168,7 @@ func (k *httpKeysAPI) RecursiveWatch(key string, idx uint64) Watcher {
type httpWatcher struct {
nextWait waitAction
@@ -60,7 +60,7 @@ type MembersAPI interface {
type httpMembersAPI struct {