2021-09-06 23:58:02 +03:00

3.2 KiB

Class: FluencePeer

This class implements the Fluence protocol for javascript-based environments. It provides all the necessary features to communicate with Fluence network

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new FluencePeer()

Creates a new Fluence Peer instance. Does not start the workflows. In order to work with the Peer it has to be initialized with the init method

Defined in

internal/FluencePeer.ts:111

Properties

callServiceHandler

callServiceHandler: CallServiceHandler

Defined in

internal/FluencePeer.ts:201

Accessors

connectionInfo

get connectionInfo(): ConnectionInfo

Get the information about Fluence Peer connections

Returns

ConnectionInfo

Defined in

internal/FluencePeer.ts:116


default

Static get default(): FluencePeer

Get the default Fluence peer instance. The default peer is used automatically in all the functions generated by the Aqua compiler if not specified otherwise.

Returns

FluencePeer

Defined in

internal/FluencePeer.ts:181

Methods

init

init(config?): Promise<void>

Initializes the peer: starts the Aqua VM, initializes the default call service handlers and (optionally) connect to the Fluence network

Parameters

Name Type Description
config? PeerConfig object specifying peer configuration

Returns

Promise<void>

Defined in

internal/FluencePeer.ts:130


initiateFlow

initiateFlow(request): Promise<void>

Parameters

Name Type
request RequestFlow

Returns

Promise<void>

Defined in

internal/FluencePeer.ts:187


uninit

uninit(): Promise<void>

Uninitializes the peer: stops all the underltying workflows, stops the Aqua VM and disconnects from the Fluence network

Returns

Promise<void>

Defined in

internal/FluencePeer.ts:172