From 8e4727c182f21feb10dfc16cec469f1866043d06 Mon Sep 17 00:00:00 2001 From: Andrew Tarzwell Date: Wed, 19 Aug 2015 12:42:21 -0400 Subject: [PATCH 1/2] Add missing round-robin-strategy to readme example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f1fcb10..152574f 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ A (work-in-progress) dummy application is being produced that uses the library t ```clojure (ns myservice (:require [curator.framework :refer (curator-framework)] - [curator.discovery :refer (service-discovery service-instance service-provider instance instances services note-error)])) + [curator.discovery :refer (service-discovery service-instance service-provider instance instances services note-error round-robin-strategy)])) ;; services (and their instances) are registered by name (def service-name "some-service") From 4f64313dbaf8f9686a2d5861c00f827bdd53cec4 Mon Sep 17 00:00:00 2001 From: Andrew Tarzwell Date: Wed, 19 Aug 2015 13:01:12 -0400 Subject: [PATCH 2/2] Rename instance to inst and add service-cache --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 152574f..10d22bb 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ A (work-in-progress) dummy application is being produced that uses the library t ```clojure (ns myservice (:require [curator.framework :refer (curator-framework)] - [curator.discovery :refer (service-discovery service-instance service-provider instance instances services note-error round-robin-strategy)])) + [curator.discovery :refer (service-discovery service-instance service-provider instance instances services note-error round-robin-strategy service-cache)])) ;; services (and their instances) are registered by name (def service-name "some-service") @@ -36,7 +36,7 @@ A (work-in-progress) dummy application is being produced that uses the library t ;; create an instance of our service. we don't specify address ;; so it'll use a public address from our network interfaces. ;; payloads must be strings for now -(def instance (service-instance service-name +(def inst (service-instance service-name "{scheme}://{address}:{port}" 1234 :payload "testing 123")) @@ -48,7 +48,7 @@ A (work-in-progress) dummy application is being produced that uses the library t ;; next we create our service discovery, which uses the client ;; in the background to register our service instance -(def discovery (service-discovery client instance :base-path "/foo")) +(def discovery (service-discovery client inst :base-path "/foo")) (.start discovery) ;; now we can see which services are registered