Let a bundle purge a deleted object's leftovers through the runtime
The runtime's objects act purge removes a deleted object's chunks: busstate.Objects.Purge and TypeScript purgeObject, so the registry's program opens no connection of its own for it. Builds: design 47 H2 §812; H-A-366
This commit is contained in:
@@ -168,6 +168,15 @@ export async function takeOnce(seat: string, ask: string, boundMs: number, state
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove what the deleted object `name` left behind in the object store `objects` (by its local name), its chunks,
|
||||
* through the runtime's `mesh/objects.purge` (H-A-366): the Go side's `busstate.Objects.Purge`. A bundle never opens a
|
||||
* connection of its own for it.
|
||||
*/
|
||||
export async function purgeObject(objects: string, name: string): Promise<void> {
|
||||
await boundChannel().ask("mesh/objects.purge", { objects, name });
|
||||
}
|
||||
|
||||
/** A state this module keeps (by its local name) or reads (`<module>.<name>`). */
|
||||
export function state<T = unknown>(name: string): State<T> {
|
||||
const bound = (): StateChannel => {
|
||||
|
||||
Reference in New Issue
Block a user