Class: Cloudy

Cloudy(options)

Super-powered OrbitDB instance

Constructor

new Cloudy(options)

Parameters:
Name Type Description
options CloudyOptions
Source:

Members

degraded :boolean

Type:
  • boolean
Source:

deviceId :string

Type:
  • string
Source:

devices :DocumentStore

Type:
Source:

orbitDb :OrbitDB

Type:
Source:

storeDefaults :Object

default options for stores
Type:
  • Object
Source:

Methods

(static) create(options) → {Promise.<Cloudy>}

Short hand to create a Cloudy instance.
Parameters:
Name Type Description
options CloudyOptions
Source:
Returns:
- Cloudy instance
Type
Promise.<Cloudy>

initIpfsInstance(ipfsOrOptions) → {Promise.<IPFS>}

helper method to create an IPFS instance based on user-supplied params
Parameters:
Name Type Description
ipfsOrOptions Object | undefined options to be passed to IPFS constructor
Source:
Returns:
Type
Promise.<IPFS>

(async) stop()

stops the underlying OrbitDB instance
Source:

(async) store(nameOrAddress, options) → {Promise.<DocumentStore>}

create a new docstore
Parameters:
Name Type Description
nameOrAddress string existing database address (can be JS object), otherwise give a random name to initiate a (possibly new) database
options *
Source:
Returns:
Type
Promise.<DocumentStore>

updateWakeupFunction(funcopt, deviceIdopt)

PUBLIC function to update wakeup function
Parameters:
Name Type Attributes Description
func function <optional>
wake up function
deviceId string <optional>
unique ID for device
Source:

(async) wakeupAll()

trigger all other devices to wake up
Source: