Constructor
new Oracle(initial)
Trusted point-of-reference for external services.
Parameters:
Name | Type | Description |
---|---|---|
initial |
Object | Initialization vector. |
- Source:
Extends
Methods
(async) _POST(key, value) → {Promise}
Insert something into a collection.
Parameters:
Name | Type | Description |
---|---|---|
key |
String | Path to add data to. |
value |
Mixed | Object to store. |
- Overrides:
- Source:
Returns:
Resolves on success with a String pointer.
- Type
- Promise
(async) _REGISTER(obj) → {Vector}
Registers an Actor. Necessary to store in a collection.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object | Instance of the object to store. |
- Overrides:
- Source:
Returns:
Returned from `storage.set`
- Type
- Vector
broadcast(msg) → {Boolean}
Core messaging function for interacting with this object in system-time.
Parameters:
Name | Type | Description |
---|---|---|
msg |
Message | Instance of a module:Message object, validated then transmitted verbatim. |
- Source:
Returns:
Returns `true` on success, `false` on failure.
- Type
- Boolean
(async) del(key)
Parameters:
Name | Type | Description |
---|---|---|
key |
Path | Key to remove. |
- Overrides:
- Source:
(async) flush()
Wipes the storage.
- Overrides:
- Source:
(async) get(key) → {Promise}
Barebones getter.
Parameters:
Name | Type | Description |
---|---|---|
key |
String | Name of data to retrieve. |
- Overrides:
- Source:
Returns:
Resolves on complete. `null` if not found.
- Type
- Promise
(async) set(key, value)
Set a `key` to a specific `value`.
Parameters:
Name | Type | Description |
---|---|---|
key |
String | Address of the information. |
value |
Mixed | Content to store at `key`. |
- Overrides:
- Source:
(async) start() → {Promise}
Start running the process.
- Overrides:
- Source:
Returns:
Resolves on complete.
- Type
- Promise
trust(source) → {Store}
Implicitly trust an Event source.
Parameters:
Name | Type | Description |
---|---|---|
source |
EventEmitter | Event-emitting source. |
- Overrides:
- Source:
Returns:
Resulting instance of Store with new trust.
- Type
- Store