W3cubDocs

/Pony

Registrar

[Source]

A Registrar keeps a map of lookup string to anything. Generally, this is used to keep a directory of long-lived service-providing actors that can be looked up name.

actor tag Registrar

Constructors

create

[Source]

new tag create()
: Registrar tag^

Returns

Public Behaviours

update

[Source]

Add, or change, a lookup mapping.

be update(
  key: String val,
  value: Any tag)

Parameters

remove

[Source]

Remove a mapping. This only takes effect if provided key currently maps to the provided value. If the key maps to some other value (perhaps after updating), the mapping won't be removed.

be remove(
  key: String val,
  value: Any tag)

Parameters

Public Functions

apply[optional A: Any tag]

[Source]

Lookup by name. Returns a promise that will be fulfilled with the mapped value if it exists and is a subtype of A. Otherwise, the promise will be rejected.

fun tag apply[optional A: Any tag](
  key: String val)
: Promise[A] tag

Parameters

Returns

Private Behaviours

_fetch[A: Any tag]

[Source]

Fulfills or rejects the promise.

be _fetch[A: Any tag](
  key: String val,
  promise: Promise[A] tag)

Parameters

© 2016-2018, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/bureaucracy-Registrar