0.0.12 • Published 11 months ago

@hiveops/apiary v0.0.12

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

JavaScript client for Apiary cache server

Installation

npm install @hiveops/apiary
# or
deno add @hiveops/apiary

Usage

import { Entry, getClient } from '@hiveops/apiary';

const client = getClient({
    baseUrl: "http://localhost:2468",
});

const entries: Entry[] = [
    new Entry({
        key: "key1",
        value: textEncoder.encode("value1"),
    }),
    new Entry({
        key: "key2",
        value: textEncoder.encode("value2"),
    }),
];

const setEntryResponse = await client.setEntries({
    keyspace,
    entries,
});
console.log(setEntryResponse);


const getEntriesResponse = await client.getEntries({
    keyspace,
    keys: entries.map((entry) => entry.key),
});
console.log(getEntriesResponse);
0.0.12

11 months ago

0.0.11

11 months ago

0.0.10

11 months ago

0.0.9

11 months ago

0.0.8

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago