p

org.dmonix

consul

package consul

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. consul
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait Candidate extends AnyRef

    Represents a candidate in the leader election

  2. class Consul extends AnyRef

    Encapsulates functions towards Consul.

  3. case class ConsulHost (host: String, port: Int = 8500) extends Product with Serializable

    Connection information to a Consul instance

    Connection information to a Consul instance

    host

    The host

    port

    Optional port (default 8500)

  4. case class DeleteKeyValue (key: String, compareAndSet: Option[Int] = None, recursive: Boolean = false) extends Product with Serializable

    Data for deleting a key/value

    Data for deleting a key/value

    key

    The name/path of the key (e.g. foo/bar/my-data)

    compareAndSet

    Will only delete the key/value of this value matches the ModifyIndex of the key stored in Consul

    recursive

    If all key/values in the provided path shall be deleted

  5. trait ElectionObserver extends AnyRef

    Observer to be notified for changes in election state.

  6. case class GetKeyValue (key: String, modifyIndex: Option[Int] = None, maxWait: Option[FiniteDuration] = None, recursive: Boolean = false) extends Product with Serializable

    Data for setting a key/value

    Data for setting a key/value

    key

    The name/path of the key (e.g. foo/bar/my-data)

    modifyIndex

    Optional modification index value to block on

    maxWait

    Optional max wait time, used in conjunction with modifyIndex

  7. case class KeyValue (createIndex: Int, modifyIndex: Int, lockIndex: Int, key: String, value: Option[String], session: Option[String]) extends Product with Serializable

    Represents a key/value stored in Consul

    Represents a key/value stored in Consul

    createIndex

    The CreateIndex value as stored in Consul

    modifyIndex

    The ModifyIndex value as stored in Consul

    lockIndex

    The LockIndex value as stored in Consul

    key

    The name/path of the key

    value

    The value in plain string format already Base64 decoded

    session

    Optional owner (session ÍD) of the key

  8. class Semaphore extends AnyRef

    A semaphore is a construction to control access to a common resource in a concurrent system.

    A semaphore is a construction to control access to a common resource in a concurrent system. The semaphore in this library allows for creation of a distributed lock. In principle a semaphore is initiated with 1..n permits, instances of a semaphore then try to acquire one permit either succeeding or failing in case there are no more permits left to take. The simplest form is a binary semaphore which has only one permit thus only allowing a single instance to acquire a permit. Semaphores are traditionally used to control access to a protected source like a database or some task that only should be executed by a single process.

    Each instance of the Semaphore class can hold exactly 0 or 1 permit thus invoking any of the tryAcquire functions mulitple times will not acquire additional permits.

  9. case class SemaphoreDestroyed (name: String) extends Exception with Product with Serializable

    Indicates that the .destroy method has been invoked on semaphore

    Indicates that the .destroy method has been invoked on semaphore

    name

    The name of the semaphore

  10. case class Session (name: Option[String] = None, lockDelay: Option[FiniteDuration] = None, node: Option[String] = None, behavior: Option[String] = None, ttl: Option[FiniteDuration] = None) extends Product with Serializable

    Represents stored session data in Consul

    Represents stored session data in Consul

    name

    Optional name of the session

    lockDelay

    Optional lock delay

    node

    Optional Consul node for the session

    behavior

    Optional behavior of the session

    ttl

    Optional Time-To-Live of the session, not providing this will in practice be a session that never times out

  11. type SessionID = String
  12. case class SetKeyValue (key: String, value: Option[String] = None, compareAndSet: Option[Int] = None, acquire: Option[SessionID] = None, release: Option[SessionID] = None) extends Product with Serializable

    Data for setting a key/value

    Data for setting a key/value

    key

    The name/path of the key (e.g. foo/bar/my-data)

    value

    Optional value of the key/data

    compareAndSet

    Will only write the key/value of this value matches the ModifyIndex of the key stored in Consul

    acquire

    Attempts to take a lock on the key using the provided session ID

    release

    Attempts to release a lock on the key using the provided session ID

Value Members

  1. object Consul

    Companion object to Consul

  2. object Implicits

  3. object LeaderElection

    Factory for creating candidates for leader election

  4. object Semaphore

    Companion object to Semaphore

Inherited from AnyRef

Inherited from Any

Ungrouped