core

module
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT

README

core

Shared core building blocks reused across the Lantern monorepo (server, client, CLI). Collects general-purpose data structures and algorithms that are not specific to the gRPC/transport layer.

Subpackages

Path Description
cache/ Generic in-memory cache with TTL.
collection/ Generic collections: priority queue (pq), set, slice helpers.
concurrent/ Concurrency primitives, including a typed pub/sub (concurrent/pubsub).
graph/ In-memory graph model and traversal/scoring helpers.
graphcache/ Graph-specialized cache: TTL'd vertices and additive decaying edges, with an optional prefix index. The server's primary store.
model/function/ Functional-style type aliases used across the other packages.
nlp/ Lightweight NLP helpers.

These packages originated in a standalone toolkit repository and were folded into this monorepo when the projects were consolidated. They have no dependencies on the rest of Lantern and are safe to import from anywhere in this module.

Directories

Path Synopsis
example command
collection
pq
set
concurrent
pubsub
Package pubsub is an in-process publish/subscribe primitive for the Lantern core.
Package pubsub is an in-process publish/subscribe primitive for the Lantern core.
pubsub/example command
example command
Package graphcache provides Lantern's in-memory graph cache: a TTL-backed vertex store plus additive, expiring directed edges.
Package graphcache provides Lantern's in-memory graph cache: a TTL-backed vertex store plus additive, expiring directed edges.
example command
Package hlc implements a Hybrid Logical Clock (HLC) suitable for stamping mutations in Lantern's leaderless full-replica replication design.
Package hlc implements a Hybrid Logical Clock (HLC) suitable for stamping mutations in Lantern's leaderless full-replica replication design.
model
Package mutationlog is the single source of truth for the stream of graph mutations that flows through Lantern's leaderless full-replica replication design.
Package mutationlog is the single source of truth for the stream of graph mutations that flows through Lantern's leaderless full-replica replication design.
example command
Command example shows the public API of the core/search package: build an inverted index, index documents, run ranked queries, and delete a document.
Command example shows the public API of the core/search package: build an inverted index, index documents, run ranked queries, and delete a document.

Jump to

Keyboard shortcuts

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