scala-etcd icon indicating copy to clipboard operation
scala-etcd copied to clipboard

Can't pass in wait for a listDir call

Open darrennoble opened this issue 9 years ago • 0 comments

It would be nice if you could pass a wait parameter into listDir to wait for changes to a folder or whole folder tree. Maybe something like this would work:

def listDir(dir: String, recursive: Boolean = false, wait: Boolean = false): Future[EtcdListResponse] = {
    val pipline: HttpRequest => Future[EtcdListResponse] = (
      sendReceive
        ~> mapErrors
        ~> unmarshal[EtcdListResponse]
      )

    pipline(Get(s"$baseUrl/$dir/?recursive=$recursive&wait=$wait"))
  }

darrennoble avatar Oct 15 '15 02:10 darrennoble