Packages

class Consul extends AnyRef

Encapsulates functions towards 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

Instance Constructors

  1. new Consul(httpSender: HttpSender)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. def createSession(session: Session): Try[SessionID]

    Attempts to create a session in Consul.

    Attempts to create a session in Consul.

    session

    Data to store on the session

    returns

    The created session id

  7. def deleteKeyValue(kv: DeleteKeyValue): Try[Boolean]

    Deletes the provided key This function is idempotent, i.e.

    Deletes the provided key This function is idempotent, i.e. it will not fail even if the key does not exist

    kv

    The key to remove

    returns

    Success if managed to access Consul, then normally 'true'

  8. def deleteKeyValue(key: String): Try[Boolean]

    Deletes the provided key This function is idempotent, i.e.

    Deletes the provided key This function is idempotent, i.e. it will not fail even if the key does not exist

    key

    The key to remove

    returns

    Success if managed to access Consul, then normally 'true'

  9. def deleteKeyValueRecursive(key: String): Try[Boolean]

    Recursively deletes the provided key and all its descendants/children.

    Recursively deletes the provided key and all its descendants/children. This function is idempotent, i.e. it will not fail even if the key does not exist

    key

    The key to remove

    returns

    Success if managed to access Consul, then normally 'true'

  10. def destroySession(sessionID: SessionID): Try[Unit]

    Attempts to destroy a session in Consul.

    Attempts to destroy a session in Consul. This function is idempotent, i.e. it will not fail even if the session does not exist

    sessionID

    The session to destroy

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. def readKeyValue(key: String): Try[Option[KeyValue]]

    Attempts to read the value for the provided key.

    Attempts to read the value for the provided key.

    key

    The full path of the key, e.g foo/bar/my-config

    returns

    Success if managed to access Consul, then Some if the value was found, None else

  21. def readKeyValueRecursive(key: String): Try[Option[Stream[KeyValue]]]

    Attempts to recursively read the key/values for the provided key path

    Attempts to recursively read the key/values for the provided key path

    key

    The path to query

    returns

    Success if managed to access Consul, then Some if the key was found followed by the stream of key/values matching the query

  22. def readKeyValueWhenChanged(key: String, modifyIndex: Int, maxWait: FiniteDuration): Try[Option[KeyValue]]

    Blocks and waits for provided key to changed value.

    Blocks and waits for provided key to changed value. This is done by waiting until the ModifyIndex on the key has gone passed the provided modifyIndex. If the provided index is lower than what is represented in Consul this function returns immediately. The function always returns the value of the key even if the provided wait time has been exceeded.

    key

    The full path of the key, e.g foo/bar/my-config

    modifyIndex

    The modification index value to block on

    maxWait

    Max wait time

    returns

    Success if managed to access Consul, then Some if the value was found, None else

  23. def readKeyValues(kv: GetKeyValue): Try[Option[Stream[KeyValue]]]

    Attempts to read the key/value(s) as specified by the provided data.

    Attempts to read the key/value(s) as specified by the provided data. The result is a stream since if recursive is requested then there could be more than one key returned

    kv

    The key to query

    returns

    Success if managed to access Consul, then Some if the key was found followed by the stream of key/values matching the query

  24. def renewSession(sessionID: SessionID): Try[Session]

    Attempts to renew a session in Consul.

    Attempts to renew a session in Consul.

    sessionID

    The session to renew

    returns

    The session data

  25. def storeKeyValue(kv: SetKeyValue): Try[Boolean]

    Attempts to store a value on the provided key.

    Attempts to store a value on the provided key. The exact behavior of the storage operation is determined by the values set on the provided SetKeyValue

    kv

    The key value data

    returns

    Success if managed to access Consul, then true id the key/value was set

  26. def storeKeyValue(key: String, value: Option[String]): Try[Boolean]

    Attempts to store a value on the provided key.

    Attempts to store a value on the provided key. This function will always write to the key irrespective if there is an owning session.

    key

    The full path of the key, e.g foo/bar/my-config

    value

    The optional value to store on the key

    returns

    Success if managed to access Consul, then true id the key/value was set

  27. def storeKeyValueIfNotSet(key: String, value: Option[String]): Try[Boolean]

    Attempts to store a value on the provided key only if the key did not previously exist.

    Attempts to store a value on the provided key only if the key did not previously exist.

    key

    The full path of the key, e.g foo/bar/my-config

    value

    The optional value to store on the key

    returns

    Success if managed to access Consul, then true id the key/value was set

  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped