mirror of
https://github.com/fluencelabs/gitbook-docs
synced 2025-06-24 12:11:44 +00:00
Merge branch 'main' into docs
This commit is contained in:
@ -14,10 +14,12 @@ Each Fluence peer is equipped with a set of "built-in" services that can be call
|
||||
|
||||
Please note that the [`fldist`](../knowledge_tools.md#fluence-proto-distributor-fldist) CLI tool, as well as the [JS SDK](../knowledge_tools.md#fluence-js-sdk), provide access to node-based services.
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### peer is\_connected
|
||||
|
||||
|
||||
Checks if there is a direct connection to the peer identified by a given PeerId
|
||||
|
||||
* **Arguments**:
|
||||
@ -30,8 +32,6 @@ Example of a service call:
|
||||
(call node ("peer" "is_connected") ["123D..."] ok)
|
||||
```
|
||||
|
||||
### peer connect
|
||||
|
||||
Initiates a connection to the specified peer
|
||||
|
||||
* **Arguments**
|
||||
@ -89,6 +89,7 @@ Example of service call:
|
||||
|
||||
### peer timestamp\_ms
|
||||
|
||||
|
||||
Get Unix timestamp in milliseconds
|
||||
|
||||
* **Arguments**: None
|
||||
@ -102,6 +103,7 @@ Example of service call:
|
||||
|
||||
### peer timestamp\_sec
|
||||
|
||||
|
||||
Get Unix timestamp in seconds
|
||||
|
||||
* **Arguments**: None
|
||||
@ -365,6 +367,7 @@ Example of service call:
|
||||
|
||||
Used in service aliasing. _\*\*_Stores the specified service provider \(provider\) in the internal storage of the node indicated in the service call and associates it with the given key \(key\). After executing add\_provider, the provider can be accessed via the get\_providers service using this key.
|
||||
|
||||
|
||||
* Arguments:
|
||||
|
||||
* key – a string; usually, it is a human-readable service alias.
|
||||
@ -391,6 +394,7 @@ Used in service aliasing to retrieve providers for a given key.
|
||||
* Returns: an array of objects of the following structure:
|
||||
|
||||
```javascript
|
||||
|
||||
{
|
||||
"peer": "123D...", // required field
|
||||
"service_id": "uuid-1234-..." // optional field
|
||||
@ -400,6 +404,7 @@ Used in service aliasing to retrieve providers for a given key.
|
||||
Example of service call:
|
||||
|
||||
```scheme
|
||||
|
||||
(call node ("deprecated" "get_providers") [key] providers)
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user