store

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 1 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

Package store holds the three ways a graph is kept: by similarity, by edge, and by assertion. They are separate interfaces because they answer separate questions, and a deployment may back them with one engine or three.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph interface {
	Node(ctx context.Context, id string, props map[string]any) error
	Edge(ctx context.Context, from, to, label string) error
	Out(ctx context.Context, id string) ([]string, error)
}

Graph answers "what is connected to this".

type Match

type Match struct {
	ID    string
	Score float64
	Meta  map[string]any
}

Match is a neighbour and how near it is.

type Triple

type Triple interface {
	Assert(ctx context.Context, s, p, o string) error
	Match(ctx context.Context, s, p, o string) ([][3]string, error)
}

Triple answers "what was asserted".

type Vector

type Vector interface {
	Put(ctx context.Context, id string, v []float32, meta map[string]any) error
	Near(ctx context.Context, v []float32, k int) ([]Match, error)
}

Vector answers "what is like this".

Jump to

Keyboard shortcuts

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