Class/Object

org.dmonix.consul

Consul

Related Docs: object Consul | package consul

Permalink

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)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. def createSession(session: Session): Try[SessionID]

    Permalink

    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]

    Permalink

    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]

    Permalink

    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]

    Permalink

    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]

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  19. def readKeyValue(key: String): Try[Option[KeyValue]]

    Permalink

    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

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

    Permalink

    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

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

    Permalink

    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

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

    Permalink

    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

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

    Permalink

    Attempts to renew a session in Consul.

    Attempts to renew a session in Consul.

    sessionID

    The session to renew

    returns

    The session data

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

    Permalink

    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

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

    Permalink

    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

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

    Permalink

    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

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped