Skip to content

Commit

Permalink
fix: review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jan 14, 2024
1 parent a5a303e commit 29ae717
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
2 changes: 2 additions & 0 deletions packages/base-zone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ a vat upgrade (durable).

This library is used internally by [`@agoric/zone`](../zone/README.md); refer to it for more details. Unless you are an author of a new Zone backing store type, or want to use `makeHeapZone` without introducing build dependencies on `@agoric/vat-data`, you should instead use `@agoric/zone`.

---

Be aware that both this package `@agoric/base-zone` and `@agoric/store` will move from the agoric-sdk repository to the endo repository and likely renamed `@endo/zone` and `@endo/store`. At that time, we will first deprecate the versions here, then replace them with deprecated stubs that reexport from their new home. We hope to eventually remove even these stubs, depending on the compat cost at that time.
27 changes: 1 addition & 26 deletions packages/store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,6 @@ Store adds some additional functionality on top of Map.

See `makeScalarWeakMapStore` for the wrapper around JavaScript's WeakMap abstraction.

# External Store

An External Store is defined by its maker function, and provides abstractions
that are compatible with large, synchronous secondary storage that can be paged
in and out of local memory.

```js
import { makeExternalStore } from '@agoric/store';

// Here is us defining an instance store for 'hello' objects.
const estore = makeExternalStore((msg = 'Hello') => ({
hello(nickname) {
return `${msg}, ${nickname}!`;
},
}));

const h = estore.makeInstance('Hi');
h.hello('friend') === 'Hi, friend!';
const wm = estore.makeWeakMap('Hello object');
wm.init(h, 'data');
// ... time passes and h is paged out and reloaded.
wm.get(h) === 'data';
wm.set(h, 'new-data');
// ... time passes and h is paged out and reloaded.
map.delete(h);
```
---

Be aware that both `@agoric/base-zone` and this package `@agoric/store` will move from the agoric-sdk repository to the endo repository and likely renamed `@endo/zone` and `@endo/store`. At that time, we will first deprecate the versions here, then replace them with deprecated stubs that reexport from their new home. We hope to eventually remove even these stubs, depending on the compat cost at that time.

0 comments on commit 29ae717

Please sign in to comment.