Asynchronous write
The following example performs an async put
.
let policy = new Policy();let key = new Key("test", "myset", "mykey");let bins = {bin: "stringValue"}let meta = { ttl: 10000 }let record = await client.get(key, bins, meta, policy)
A callback can be provided to handle results as an alternative to returning a promise.
let policy = new Policy();let key = new Key("test", "myset", "mykey");let bins = {bin: "stringValue"}let meta = { ttl: 10000 }let record = client.get(key, bins, meta, policy, (error, client) => { /* Add Client code here */ })