mirror of
https://github.com/aljazceru/pear-docs.git
synced 2025-12-17 14:34:19 +01:00
link fixes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
<mark style="background-color:green;">**stable**</mark>
|
||||
|
||||
Hyperbee is an append only B-tree based on [hypercore.md](hypercore.md). It provides a key/value-store API, with methods for inserting and getting key-value pairs, atomic batch insertions, and creating sorted iterators. It uses a single Hypercore for storage, using a technique called embedded indexing. It provides features like cache warmup extension, efficient diffing, version control, sorted iteration, and sparse downloading.
|
||||
Hyperbee is an append only B-tree based on [`Hypercore`](hypercore.md). It provides a key/value-store API, with methods for inserting and getting key-value pairs, atomic batch insertions, and creating sorted iterators. It uses a single Hypercore for storage, using a technique called embedded indexing. It provides features like cache warmup extension, efficient diffing, version control, sorted iteration, and sparse downloading.
|
||||
|
||||
> As with the Hypercore, a Hyperbee can only have a **single writer on a single machine**; the creator of the Hyperdrive is the only person who can modify it as they're the only one with the private key. That said, the writer can replicate to **many readers**, in a manner similar to BitTorrent.
|
||||
|
||||
@@ -58,7 +58,7 @@ npm install hyperbee
|
||||
|
||||
#### **`const db = new Hyperbee(core, [options])`**
|
||||
|
||||
Make a new Hyperbee instance. `core` should be a [hypercore.md](hypercore.md).
|
||||
Make a new Hyperbee instance. `core` should be a [`Hypercore`](hypercore.md).
|
||||
|
||||
`options` include:
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@ The `isInitiator` argument is a boolean indicating whether a peer is the initiat
|
||||
|
||||
To multiplex the replication over an existing Hypercore replication stream, another stream instance can be passed instead of the `isInitiator` Boolean.
|
||||
|
||||
To replicate a Hypercore using [hyperswarm.md](hyperswarm.md):
|
||||
To replicate a Hypercore using [`Hyperswarm`](hyperswarm.md):
|
||||
|
||||
```javascript
|
||||
// assuming swarm is a Hyperswarm instance and core is a Hypercore
|
||||
@@ -474,10 +474,10 @@ swarm.on('connection', conn => {
|
||||
})
|
||||
```
|
||||
|
||||
> To replicate many Hypercores over a single Hyperswarm connection, see [corestore.md](../helpers/corestore.md).
|
||||
> To replicate many Hypercores over a single Hyperswarm connection, see [`Corestore`](../helpers/corestore.md).
|
||||
|
||||
|
||||
If not using [hyperswarm.md](hyperswarm.md) or [corestore.md](../helpers/corestore.md), specify the `isInitiator` field, which will create a fresh protocol stream that can be piped over any transport:
|
||||
If not using [`Hyperswarm`](hyperswarm.md) or [`Corestore`](../helpers/corestore.md), specify the `isInitiator` field, which will create a fresh protocol stream that can be piped over any transport:
|
||||
|
||||
```javascript
|
||||
// assuming we have two cores, localCore + remoteCore, sharing the same key
|
||||
|
||||
@@ -65,7 +65,7 @@ npm install hyperdrive
|
||||
|
||||
#### **`const drive = new Hyperdrive(store, [key])`**
|
||||
|
||||
Creates a new Hyperdrive instance. `store` must be an instance of [corestore.md](../helpers/corestore.md).
|
||||
Creates a new Hyperdrive instance. `store` must be an instance of [`Corestore`](../helpers/corestore.md).
|
||||
|
||||
By default, it uses the core at `{ name: 'db' }` from `store`, unless the public `key` is set.
|
||||
|
||||
@@ -255,7 +255,7 @@ Returns a read stream of entries in the drive.
|
||||
|
||||
#### **`const mirror = drive.mirror(out, [options])`**
|
||||
|
||||
Mirrors this drive into another. Returns a [mirrordrive.md](../helpers/mirrordrive.md) instance constructed with `options`.
|
||||
Mirrors this drive into another. Returns a [`MirrorDrive`](../helpers/mirrordrive.md) instance constructed with `options`.
|
||||
|
||||
Call `await mirror.done()` to wait for the mirroring to finish.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user