store

command
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command store uses the three ways a graph is kept — by similarity, by edge, by assertion — and they are three interfaces because they answer three questions: what is like this, what is connected to this, what was asserted. Mem implements all three, so a caller that wants one and a caller that wants all three use the same object.

File is the same store with a log behind it: each write is appended as one JSON record and flushed before the call returns, so reopening the file replays exactly what was acknowledged.

The vectors come from a bag of words over a fixed vocabulary, so the example runs offline and its numbers are reproducible. A real embedder goes behind store.Vector without changing anything below.

go run ./examples/store

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL