--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/scala/Example.scala Tue Jul 21 09:24:52 2015 +0200
@@ -0,0 +1,27 @@
+package couchdb.changes
+
+import akka.actor._
+import spray.http.Uri
+
+object LoggingActor extends Actor with ActorLogging {
+ log.info("Initializing LoggingActor")
+ def receive: Receive = {
+ case x => log.info("Received {}", x)
+ }
+}
+
+object Example extends App {
+
+ val system = ActorSystem()
+ val stream = system.actorOf(Props(new ChangesStreamActor(
+ system.actorOf(Props(LoggingActor)))))
+
+ stream ! Uri("http://localhost:5984/example/_changes").withQuery(
+ "feed" -> "continuous"
+ , "heartbeat" -> "5000"
+ , "include_docs" -> "true"
+ )
+
+}
+
+// vim: set ts=2 sw=2 et: