Documentation
¶
Overview ¶
Package gograph is a Go module for graph persistence, manipulation, and fast search.
The library scales from small in-memory graphs to graphs too large to fit in RAM, while remaining idiomatic, allocation-conscious, and safe under high load and high concurrency.
Subpackages provide the building blocks:
- graph — core types, generic node identifiers, and graph interfaces.
- graph/adjlist — mutable adjacency-list backend.
- graph/csr — immutable compressed sparse row view for analytics.
- graph/lpg — labelled property graph model (labels, typed properties).
- graph/index — secondary indexes (label bitmap, hash, B+ tree).
- graph/io — importers and exporters (CSV, GraphML, DOT, JSON Lines).
- search — traversal and path-finding algorithms.
- search/centrality, search/community, search/flow — analytics suites.
- store — durable persistence (WAL, snapshots, mmap'd CSR).
Subpackages are added incrementally per the project roadmap; the present package documents the top-level module only.
Common tasks and their entrypoints ¶
The following map points each common task at the function or type that starts it. Every link resolves to an exported symbol; follow it for the full signature and contract.
Build a labelled property graph:
- [lpg.New] constructs a Graph[N, W]; add nodes, labels, typed properties, and edges through its methods.
Run a Cypher query:
- [cypher.NewEngine] wraps an in-memory lpg.Graph[string, float64].
- [cypher.Engine.Run] executes a query string with typed parameters.
Run durable, WAL-backed Cypher queries:
- [cypher.NewEngineWithStore] binds the engine to a [txn.Store], so writes are journalled and survive a crash.
Pass parameters to a query:
- [cypher.Engine.RunAny] accepts plain Go values as parameters.
- [cypher.BindParams] converts a map of Go values into the typed parameter map that [cypher.Engine.Run] expects.
Find a shortest path (weighted):
- [search.Dijkstra] for non-negative edge weights.
- [search.AStar] when an admissible heuristic is available.
Traverse without weights:
- [search.BFS] for breadth-first order and unweighted distances.
- [search.DFS] for depth-first order.
Compute analytics:
- [centrality.PageRank] for influence ranking.
- [community.Leiden] (or [community.LabelPropagation]) for community detection; pair with [community.DefaultLeidenOptions].
- [flow.MaxFlow] / [flow.MinCostMaxFlow] for network-flow problems.
Import and export graphs:
- CSV: [csv.ReadInto] and [csv.Write].
- GraphML: [graphml.ReadInto] / [graphml.ReadWithProps] and [graphml.Write] / [graphml.WriteWithProps].
- JSON Lines: [jsonl.ReadInto] / [jsonl.ReadWithProps] and [jsonl.Write] / [jsonl.WriteWithProps].
- DOT (export only): [dot.Write].
Persist and recover:
- [wal.Open] opens a write-ahead log for appending frames.
- [snapshot.WriteSnapshotFull] writes a full CSR-plus-labels snapshot to a directory.
- [recovery.Open] reconstructs a graph from a snapshot and its WAL.
Serve the Bolt protocol:
- [server.NewServer] starts a Bolt v5 server backed by a [cypher.Engine].
NodeID space, MaxNodeID, and live nodes ¶
The graph.Mapper interns user keys into compact NodeIDs using a 256-way sharded layout; the shard index occupies the top byte of each NodeID. As a result MaxNodeID() typically rounds up well above the number of distinct keys, and analytical algorithms that allocate per-NodeID buffers (rank vectors, community-ID slices) produce slices of length MaxNodeID() with sentinel values in the "ghost" slots. Use graph/csr.CSR.LiveMask, LiveNodes, or LiveCount to iterate only the meaningful results.
See docs/maxnodeid.md for a worked example and recipes for translating live NodeIDs back to user keys via Mapper.Resolve.
Directories
¶
| Path | Synopsis |
|---|---|
|
bench
|
|
|
dimacs9
Package dimacs9 implements the harness that drives GoGraph against the DIMACS 9th Implementation Challenge shortest-paths workload.
|
Package dimacs9 implements the harness that drives GoGraph against the DIMACS 9th Implementation Challenge shortest-paths workload. |
|
ldbc
Package ldbc implements the harness GoGraph uses against the LDBC Social Network Benchmark workloads.
|
Package ldbc implements the harness GoGraph uses against the LDBC Social Network Benchmark workloads. |
|
rmat
Package rmat implements the RMAT (Recursive MATrix) generator of Chakrabarti, Zhan & Faloutsos (SDM 2004), used to produce power-law-shaped synthetic graphs that match the degree distributions observed in real-world social / web networks.
|
Package rmat implements the RMAT (Recursive MATrix) generator of Chakrabarti, Zhan & Faloutsos (SDM 2004), used to produce power-law-shaped synthetic graphs that match the degree distributions observed in real-world social / web networks. |
|
soak
command
cypher_rw.go — Cypher RW mixed-workload harness for the soak binary.
|
cypher_rw.go — Cypher RW mixed-workload harness for the soak binary. |
|
bolt
|
|
|
packstream
Package packstream implements the PackStream binary serialisation format used by the Bolt protocol.
|
Package packstream implements the PackStream binary serialisation format used by the Bolt protocol. |
|
proto
Package proto implements the Bolt v5 wire protocol message types, handshake negotiation, and chunked framing.
|
Package proto implements the Bolt v5 wire protocol message types, handshake negotiation, and chunked framing. |
|
server
Package server implements the Bolt v5 TCP server for the GoGraph Cypher engine.
|
Package server implements the Bolt v5 TCP server for the GoGraph Cypher engine. |
|
cmd
|
|
|
crashinject-helper
command
Command crashinject-helper is the child process spawned by the crashinject harness during crash-injection tests.
|
Command crashinject-helper is the child process spawned by the crashinject harness during crash-injection tests. |
|
fmtfixture
command
Command fmtfixture regenerates the frozen on-disk fixtures used by the rolling-upgrade compatibility tests in store/wal, store/snapshot, and store/csrfile.
|
Command fmtfixture regenerates the frozen on-disk fixtures used by the rolling-upgrade compatibility tests in store/wal, store/snapshot, and store/csrfile. |
|
sim
command
Command sim runs the GoGraph deterministic simulation testing (DST) harness.
|
Command sim runs the GoGraph deterministic simulation testing (DST) harness. |
|
sim-xrelease-helper
command
Command sim-xrelease-helper is the prior-release subprocess driver for the DST cross-release harness (internal/sim).
|
Command sim-xrelease-helper is the prior-release subprocess driver for the DST cross-release harness (internal/sim). |
|
Package cypher provides the public query engine API for the GoGraph Cypher executor.
|
Package cypher provides the public query engine API for the GoGraph Cypher executor. |
|
ast
Package ast defines the Abstract Syntax Tree (AST) for openCypher 9.
|
Package ast defines the Abstract Syntax Tree (AST) for openCypher 9. |
|
exec
Package exec implements the Volcano-style executor for the Cypher query engine.
|
Package exec implements the Volcano-style executor for the Cypher query engine. |
|
explain
Package explain renders Cypher execution plans as human-readable text (EXPLAIN mode) and instruments them with per-operator execution statistics (PROFILE mode).
|
Package explain renders Cypher execution plans as human-readable text (EXPLAIN mode) and instruments them with per-operator execution statistics (PROFILE mode). |
|
expr
Package expr defines the runtime value model for the Cypher executor.
|
Package expr defines the runtime value model for the Cypher executor. |
|
funcs
Package funcs implements the built-in Cypher function registry.
|
Package funcs implements the built-in Cypher function registry. |
|
ir
Package ir defines the logical plan intermediate representation (IR) for the Cypher query compiler.
|
Package ir defines the logical plan intermediate representation (IR) for the Cypher query compiler. |
|
parser
Package parser translates the ANTLR4-generated Cypher parse tree into the typed AST defined in github.com/FlavioCFOliveira/GoGraph/cypher/ast.
|
Package parser translates the ANTLR4-generated Cypher parse tree into the typed AST defined in github.com/FlavioCFOliveira/GoGraph/cypher/ast. |
|
parser/gen
Package gen contains the ANTLR4-generated lexer and parser for openCypher 9.
|
Package gen contains the ANTLR4-generated lexer and parser for openCypher 9. |
|
procs
Package procs defines the procedure registry for the Cypher executor.
|
Package procs defines the procedure registry for the Cypher executor. |
|
sema
Package sema implements the scope-analysis pass for openCypher queries.
|
Package sema implements the scope-analysis pass for openCypher queries. |
|
tck
Package tck records the conformance evolution of the GoGraph Cypher engine against the openCypher Technology Compatibility Kit.
|
Package tck records the conformance evolution of the GoGraph Cypher engine against the openCypher Technology Compatibility Kit. |
|
Package ds provides small generic data-structure primitives that support gograph's algorithms but do not themselves model a graph.
|
Package ds provides small generic data-structure primitives that support gograph's algorithms but do not themselves model a graph. |
|
examples
|
|
|
01_basic
command
Example 01_basic — build a weighted directed transport network, freeze it to an immutable CSR snapshot, and run a single-source Dijkstra shortest-paths query with route reconstruction.
|
Example 01_basic — build a weighted directed transport network, freeze it to an immutable CSR snapshot, and run a single-source Dijkstra shortest-paths query with route reconstruction. |
|
02_property_graph
command
Example 02_property_graph — build a labelled property graph (LPG) with an optional type schema, then run label- and property-indexed MATCH-style queries and read the typed properties back out.
|
Example 02_property_graph — build a labelled property graph (LPG) with an optional type schema, then run label- and property-indexed MATCH-style queries and read the typed properties back out. |
|
03_advanced_algorithms
command
Example 03_advanced_algorithms — runs four algorithms over one shared, immutable CSR snapshot: BFS, Dijkstra, exact Brandes betweenness centrality, and PageRank — and reports per-algorithm evidence.
|
Example 03_advanced_algorithms — runs four algorithms over one shared, immutable CSR snapshot: BFS, Dijkstra, exact Brandes betweenness centrality, and PageRank — and reports per-algorithm evidence. |
|
04_persistence
command
Example 04_persistence — the full GoGraph durability path on a real directory, driven at a configurable, reproducible scale.
|
Example 04_persistence — the full GoGraph durability path on a real directory, driven at a configurable, reproducible scale. |
|
05_out_of_core
command
Example 05_out_of_core — Tier 2 external memory: build a scale-free web graph, persist its CSR adjacency as an on-disk csrfile, re-open it by mmap, and run semi-external PageRank directly over the mapped region.
|
Example 05_out_of_core — Tier 2 external memory: build a scale-free web graph, persist its CSR adjacency as an on-disk csrfile, re-open it by mmap, and run semi-external PageRank directly over the mapped region. |
|
06_csv_import
command
Example 06_csv_import — an interchange round-trip benchmark for the edge-list serialisers: generate a seeded follower graph as CSV in memory, parse it back with csv.ReadIntoCtx, then re-serialise the resulting graph as CSV with csv.WriteCtx and as newline-delimited JSON (JSON Lines) with jsonl.WriteCtx, measuring each leg.
|
Example 06_csv_import — an interchange round-trip benchmark for the edge-list serialisers: generate a seeded follower graph as CSV in memory, parse it back with csv.ReadIntoCtx, then re-serialise the resulting graph as CSV with csv.WriteCtx and as newline-delimited JSON (JSON Lines) with jsonl.WriteCtx, measuring each leg. |
|
07_graphml_roundtrip
command
Example 07_graphml_roundtrip — a GraphML interchange round-trip over a realistic, seeded link graph.
|
Example 07_graphml_roundtrip — a GraphML interchange round-trip over a realistic, seeded link graph. |
|
08_pagerank
command
Example 08_pagerank — runs PageRank over a seeded, scale-free directed web and reports the most authoritative pages, most to least important.
|
Example 08_pagerank — runs PageRank over a seeded, scale-free directed web and reports the most authoritative pages, most to least important. |
|
09_leiden
command
Example 09_leiden — modularity-optimising community detection with community.Leiden over a realistic, seeded planted-partition graph.
|
Example 09_leiden — modularity-optimising community detection with community.Leiden over a realistic, seeded planted-partition graph. |
|
10_dimacs9_routing
command
Example 10_dimacs9_routing — build a deterministic synthetic road network with the DIMACS 9 harness, freeze it into an immutable CSR snapshot, run a concrete single-source shortest-paths query (search.Dijkstra) that reconstructs a route, and measure search performance with a distribution of random probe queries.
|
Example 10_dimacs9_routing — build a deterministic synthetic road network with the DIMACS 9 harness, freeze it into an immutable CSR snapshot, run a concrete single-source shortest-paths query (search.Dijkstra) that reconstructs a route, and measure search performance with a distribution of random probe queries. |
|
11_social_network
command
Example 11_social_network — an end-to-end social-network workload over a labelled property graph (LPG): PageRank influence ranking, Leiden community detection, a manual friend-of-friend recommendation walk, and a structural-analytics pass (k-core, triangles, diameter, reachability), all over ONE seeded, scale-parametrised social graph.
|
Example 11_social_network — an end-to-end social-network workload over a labelled property graph (LPG): PageRank influence ranking, Leiden community detection, a manual friend-of-friend recommendation walk, and a structural-analytics pass (k-core, triangles, diameter, reachability), all over ONE seeded, scale-parametrised social graph. |
|
12_build_dependency
command
Example 12_build_dependency — model a software build-dependency graph, derive a valid build order with search.TopologicalSort (Kahn's algorithm), and detect a circular dependency with search.TarjanSCC.
|
Example 12_build_dependency — model a software build-dependency graph, derive a valid build order with search.TopologicalSort (Kahn's algorithm), and detect a circular dependency with search.TarjanSCC. |
|
13_network_reliability
command
Example 13_network_reliability — a suite of resilience analyses over ONE synthetic communication backbone, derived from a single capacitated edge list:
|
Example 13_network_reliability — a suite of resilience analyses over ONE synthetic communication backbone, derived from a single capacitated edge list: |
|
14_routing_alternatives
command
Example 14_routing_alternatives — compare three flavours of shortest-path computation on ONE seeded coordinate routing graph: classical single-source Dijkstra, Yen's k-shortest loopless paths for ranked alternatives, and A* driven by a coordinate-based Euclidean heuristic that expands fewer nodes than Dijkstra for the same optimal cost.
|
Example 14_routing_alternatives — compare three flavours of shortest-path computation on ONE seeded coordinate routing graph: classical single-source Dijkstra, Yen's k-shortest loopless paths for ranked alternatives, and A* driven by a coordinate-based Euclidean heuristic that expands fewer nodes than Dijkstra for the same optimal cost. |
|
15_task_assignment
command
Example 15_task_assignment — two bipartite assignment algorithms side by side over one seeded, scale-parametrised worker/task instance: search.Hungarian computes the globally cheapest one-to-one assignment over the full cost matrix, and search.HopcroftKarp computes the largest matching once a feasibility rule prunes the edges.
|
Example 15_task_assignment — two bipartite assignment algorithms side by side over one seeded, scale-parametrised worker/task instance: search.Hungarian computes the globally cheapest one-to-one assignment over the full cost matrix, and search.HopcroftKarp computes the largest matching once a feasibility rule prunes the edges. |
|
16_centrality_analytics
command
Example 16_centrality_analytics — runs a suite of analytics over one shared, immutable CSR snapshot: exact Brandes betweenness centrality, four complementary whole-graph centralities (closeness and harmonic, distance-based; eigenvector and Katz, spectral/walk-based), and label-propagation community detection — with deterministic tie-breaking, and reports per-analysis evidence.
|
Example 16_centrality_analytics — runs a suite of analytics over one shared, immutable CSR snapshot: exact Brandes betweenness centrality, four complementary whole-graph centralities (closeness and harmonic, distance-based; eigenvector and Katz, spectral/walk-based), and label-propagation community detection — with deterministic tie-breaking, and reports per-analysis evidence. |
|
17_transactional_log
command
Example 17_transactional_log — a durable financial ledger: a WAL-backed store with a background checkpointer that folds the log into a self-sufficient on-disk snapshot, plus recovery after a simulated crash.
|
Example 17_transactional_log — a durable financial ledger: a WAL-backed store with a background checkpointer that folds the log into a self-sufficient on-disk snapshot, plus recovery after a simulated crash. |
|
18_oocore_pipeline
command
Example 18_oocore_pipeline — the full out-of-core (Tier 2) pipeline: generate a directed web-link graph as a CSV edge list, ingest it through the CSV reader, freeze it into a CSR snapshot, persist that snapshot as an on-disk csrfile, re-open the file by mmap, and run semi-external BFS plus PageRank directly over the mapped region.
|
Example 18_oocore_pipeline — the full out-of-core (Tier 2) pipeline: generate a directed web-link graph as a CSV edge list, ingest it through the CSV reader, freeze it into a CSR snapshot, persist that snapshot as an on-disk csrfile, re-open the file by mmap, and run semi-external BFS plus PageRank directly over the mapped region. |
|
19_pattern_query
command
Example 19_pattern_query — the fluent graph/query pattern API at scale.
|
Example 19_pattern_query — the fluent graph/query pattern API at scale. |
|
20_concurrent_reads
command
Example 20_concurrent_reads — the lock-free read contract of a frozen CSR snapshot, exercised by many concurrent readers.
|
Example 20_concurrent_reads — the lock-free read contract of a frozen CSR snapshot, exercised by many concurrent readers. |
|
21_typed_recovery
command
Example 21_typed_recovery — durable recovery of a typed (int64, float64) graph through the canonical recovery.Open[N, W] path.
|
Example 21_typed_recovery — durable recovery of a typed (int64, float64) graph through the canonical recovery.Open[N, W] path. |
|
22_cypher
command
Example 22_cypher — the GoGraph Cypher engine, the module's flagship (100% openCypher TCK compliant at the execution level), driven over a realistic, seeded social graph.
|
Example 22_cypher — the GoGraph Cypher engine, the module's flagship (100% openCypher TCK compliant at the execution level), driven over a realistic, seeded social graph. |
|
23_bolt_server
command
Example 23_bolt_server drives the GoGraph Bolt v5 server end to end: it starts the embedded bolt/server over an in-memory labelled property graph, connects the official neo4j-go-driver/v5 as a real client, runs a battery of Cypher queries over driver sessions, and shuts everything down cleanly with no goroutine left behind.
|
Example 23_bolt_server drives the GoGraph Bolt v5 server end to end: it starts the embedded bolt/server over an in-memory labelled property graph, connects the official neo4j-go-driver/v5 as a real client, runs a battery of Cypher queries over driver sessions, and shuts everything down cleanly with no goroutine left behind. |
|
24_social_network_cli
command
Package main implements `24_social_network_cli`, an example one-shot CLI that demonstrates how to build, persist and query a labelled property graph for a social-network domain using GoGraph.
|
Package main implements `24_social_network_cli`, an example one-shot CLI that demonstrates how to build, persist and query a labelled property graph for a social-network domain using GoGraph. |
|
25_software_house_api
command
Command 25_software_house_api is a persistent REST WebAPI that demonstrates how to build, query and mutate a multi-layer Labeled Property Graph (LPG) with GoGraph in a production-shaped service.
|
Command 25_software_house_api is a persistent REST WebAPI that demonstrates how to build, query and mutate a multi-layer Labeled Property Graph (LPG) with GoGraph in a production-shaped service. |
|
26_social_scale_bench
command
Example 26_social_scale_bench — a large-scale social-network benchmark for query performance and resource consumption.
|
Example 26_social_scale_bench — a large-scale social-network benchmark for query performance and resource consumption. |
|
27_concurrent_txn
command
Example 27_concurrent_txn — transactional ISOLATION and ATOMICITY of the WAL-backed Cypher engine, certified under concurrency and the race detector.
|
Example 27_concurrent_txn — transactional ISOLATION and ATOMICITY of the WAL-backed Cypher engine, certified under concurrency and the race detector. |
|
28_negative_weights
command
Example 28_negative_weights — single-source shortest paths over a graph with NEGATIVE edge weights, using Bellman-Ford where Dijkstra cannot, and cross-checking the result against Johnson's all-pairs reweighting.
|
Example 28_negative_weights — single-source shortest paths over a graph with NEGATIVE edge weights, using Bellman-Ford where Dijkstra cannot, and cross-checking the result against Johnson's all-pairs reweighting. |
|
29_all_pairs
command
Example 29_all_pairs — compute all-pairs shortest paths (APSP) over one shared, immutable CSR snapshot with all three APSP algorithms the module ships — search.DijkstraAPSP, search.FloydWarshall, and search.JohnsonAPSP — cross-check that the three distance matrices are bit-identical, and derive the classical graph metrics (radius, diameter, per-node eccentricity) from the result.
|
Example 29_all_pairs — compute all-pairs shortest paths (APSP) over one shared, immutable CSR snapshot with all three APSP algorithms the module ships — search.DijkstraAPSP, search.FloydWarshall, and search.JohnsonAPSP — cross-check that the three distance matrices are bit-identical, and derive the classical graph metrics (radius, diameter, per-node eccentricity) from the result. |
|
30_min_spanning_tree
command
Example 30_min_spanning_tree — minimum-cost backbone design over one shared, immutable CSR snapshot: it builds a seeded, scale-parametrised geographic site network, then computes its minimum spanning tree with BOTH of GoGraph's MST algorithms — Prim (search.PrimMST) and Kruskal (search.KruskalMST) — and cross-checks them against each other as a correctness oracle.
|
Example 30_min_spanning_tree — minimum-cost backbone design over one shared, immutable CSR snapshot: it builds a seeded, scale-parametrised geographic site network, then computes its minimum spanning tree with BOTH of GoGraph's MST algorithms — Prim (search.PrimMST) and Kruskal (search.KruskalMST) — and cross-checks them against each other as a correctness oracle. |
|
31_metrics_observability
command
Example 31_metrics_observability — GoGraph's observability surface, driven end-to-end over a realistic, seeded service-mesh call graph.
|
Example 31_metrics_observability — GoGraph's observability surface, driven end-to-end over a realistic, seeded service-mesh call graph. |
|
32_euler
command
Example 32_euler — Eulerian circuits over a route-inspection network, using Hierholzer's algorithm on both an undirected and a directed graph.
|
Example 32_euler — Eulerian circuits over a route-inspection network, using Hierholzer's algorithm on both an undirected and a directed graph. |
|
33_generation_swap
command
Example 33_generation_swap — the read-mostly MVCC snapshot-swap pattern of graph/generation, under concurrent readers.
|
Example 33_generation_swap — the read-mostly MVCC snapshot-swap pattern of graph/generation, under concurrent readers. |
|
34_bolt_transactions
command
Example 34_bolt_transactions — the Bolt v5 write and transaction surface, driven end to end with the official neo4j-go-driver against GoGraph's embedded Bolt server.
|
Example 34_bolt_transactions — the Bolt v5 write and transaction surface, driven end to end with the official neo4j-go-driver against GoGraph's embedded Bolt server. |
|
Package graph defines the core types and interfaces shared by every backend in the gograph module.
|
Package graph defines the core types and interfaces shared by every backend in the gograph module. |
|
adjlist
Package adjlist provides a mutable, sharded adjacency-list backend for the gograph module.
|
Package adjlist provides a mutable, sharded adjacency-list backend for the gograph module. |
|
csr
Package csr provides an immutable Compressed Sparse Row (CSR) view of a graph for read-mostly analytical workloads.
|
Package csr provides an immutable Compressed Sparse Row (CSR) view of a graph for read-mostly analytical workloads. |
|
generation
Package generation publishes immutable graph snapshots (typically csr.CSR views) under a refcount-protected pointer so readers can observe a consistent generation while a new one is being prepared in the background.
|
Package generation publishes immutable graph snapshots (typically csr.CSR views) under a refcount-protected pointer so readers can observe a consistent generation while a new one is being prepared in the background. |
|
index
Package index coordinates the secondary indexes attached to a labelled property graph.
|
Package index coordinates the secondary indexes attached to a labelled property graph. |
|
index/btree
Package btree provides an order-preserving property index over a constraints.Ordered value type, answering range predicates against the NodeIDs that carry each value.
|
Package btree provides an order-preserving property index over a constraints.Ordered value type, answering range predicates against the NodeIDs that carry each value. |
|
index/hash
Package hash provides a sharded hash index from arbitrary comparable property values to the set of NodeIDs that carry them, represented as a 64-bit Roaring bitmap.
|
Package hash provides a sharded hash index from arbitrary comparable property values to the set of NodeIDs that carry them, represented as a 64-bit Roaring bitmap. |
|
index/label
Package label provides a Roaring-bitmap-backed inverted index from label identifiers to the NodeIDs that carry them.
|
Package label provides a Roaring-bitmap-backed inverted index from label identifiers to the NodeIDs that carry them. |
|
io/csv
Package csv reads and writes graphs as edge lists in CSV format.
|
Package csv reads and writes graphs as edge lists in CSV format. |
|
io/dot
Package dot writes graphs in the Graphviz DOT format (https://graphviz.org/doc/info/lang.html).
|
Package dot writes graphs in the Graphviz DOT format (https://graphviz.org/doc/info/lang.html). |
|
io/graphml
Package graphml reads and writes graphs in the GraphML XML dialect (http://graphml.graphdrawing.org/).
|
Package graphml reads and writes graphs in the GraphML XML dialect (http://graphml.graphdrawing.org/). |
|
io/jsonl
Package jsonl reads and writes graphs in newline-delimited JSON (NDJSON / JSON Lines) format.
|
Package jsonl reads and writes graphs in newline-delimited JSON (NDJSON / JSON Lines) format. |
|
lpg
Package lpg implements the Labelled Property Graph model on top of the github.com/FlavioCFOliveira/GoGraph/graph/adjlist mutable adjacency-list backend.
|
Package lpg implements the Labelled Property Graph model on top of the github.com/FlavioCFOliveira/GoGraph/graph/adjlist mutable adjacency-list backend. |
|
lpg/schema
Package schema declares the optional type schema for a labelled property graph: which labels exist, which property keys exist, which lpg.PropertyKind each property carries, and which properties each label requires.
|
Package schema declares the optional type schema for a labelled property graph: which labels exist, which property keys exist, which lpg.PropertyKind each property carries, and which properties each label requires. |
|
query
Package query provides a fluent, type-safe programmatic API for expressing MATCH-style pattern queries against a labelled property graph snapshot.
|
Package query provides a fluent, type-safe programmatic API for expressing MATCH-style pattern queries against a labelled property graph snapshot. |
|
internal
|
|
|
clock
Package clock provides a minimal, injectable wall-clock abstraction so that time-dependent code paths — the checkpoint cadence (store/checkpoint) and the Bolt session/connection deadlines (bolt/server) — can be driven by a deterministic fake clock under test (notably the deterministic simulation testing harness in internal/sim) instead of reading real wall time.
|
Package clock provides a minimal, injectable wall-clock abstraction so that time-dependent code paths — the checkpoint cadence (store/checkpoint) and the Bolt session/connection deadlines (bolt/server) — can be driven by a deterministic fake clock under test (notably the deterministic simulation testing harness in internal/sim) instead of reading real wall time. |
|
concurrencydoc
Package concurrencydoc holds the CI doc-scan gate that enforces the CLAUDE.md mandate: "Every exported type carries a godoc clause stating whether it is safe for concurrent use; ambiguity is a defect."
|
Package concurrencydoc holds the CI doc-scan gate that enforces the CLAUDE.md mandate: "Every exported type carries a godoc clause stating whether it is safe for concurrent use; ambiguity is a defect." |
|
crashinject
Package crashinject provides a subprocess-based crash-injection harness for deterministic crash-safety testing of WAL, snapshot, and checkpoint write paths.
|
Package crashinject provides a subprocess-based crash-injection harness for deterministic crash-safety testing of WAL, snapshot, and checkpoint write paths. |
|
crashpoint
Package crashpoint holds the production-callable half of the crash-injection machinery: the Breakpoint hook and the environment variables that drive it.
|
Package crashpoint holds the production-callable half of the crash-injection machinery: the Breakpoint hook and the environment variables that drive it. |
|
goldens
Package goldens provides a uniform golden-file assertion helper for tests that compare byte-for-byte output against stored fixtures.
|
Package goldens provides a uniform golden-file assertion helper for tests that compare byte-for-byte output against stored fixtures. |
|
invariants
Package invariants provides hardened assertion helpers for graph property-based tests.
|
Package invariants provides hardened assertion helpers for graph property-based tests. |
|
metrics
Package metrics is GoGraph's optional observability surface.
|
Package metrics is GoGraph's optional observability surface. |
|
metrics/prometheus
Package prometheus provides a [metrics.Backend] implementation that produces Prometheus-compatible text exposition output — with no dependency on github.com/prometheus/client_golang.
|
Package prometheus provides a [metrics.Backend] implementation that produces Prometheus-compatible text exposition output — with no dependency on github.com/prometheus/client_golang. |
|
shapegen
Package shapegen defines a uniform contract for graph-shape generators used across property-based tests, golden corpora, and benchmarks in GoGraph.
|
Package shapegen defines a uniform contract for graph-shape generators used across property-based tests, golden corpora, and benchmarks in GoGraph. |
|
sim
Package sim implements a deterministic simulation testing (DST) harness for the GoGraph engine, modelled on TigerBeetle's VOPR.
|
Package sim implements a deterministic simulation testing (DST) harness for the GoGraph engine, modelled on TigerBeetle's VOPR. |
|
subproc
Package subproc provides a deterministic subprocess helper for cross-process tests.
|
Package subproc provides a deterministic subprocess helper for cross-process tests. |
|
testfs
Package testfs provides a fault-injection wrapper around *os.File for use in crash-safety and durability tests of WAL, snapshot, and checkpoint paths.
|
Package testfs provides a fault-injection wrapper around *os.File for use in crash-safety and durability tests of WAL, snapshot, and checkpoint paths. |
|
testlayers
Package testlayers gates tests by execution layer.
|
Package testlayers gates tests by execution layer. |
|
Package metrics is the public observability facade for GoGraph.
|
Package metrics is the public observability facade for GoGraph. |
|
Package search provides graph traversal and path-finding algorithms over the immutable github.com/FlavioCFOliveira/GoGraph/graph/csr.CSR read-only view.
|
Package search provides graph traversal and path-finding algorithms over the immutable github.com/FlavioCFOliveira/GoGraph/graph/csr.CSR read-only view. |
|
centrality
Package centrality implements vertex importance metrics.
|
Package centrality implements vertex importance metrics. |
|
community
Package community implements community detection algorithms for undirected graphs.
|
Package community implements community detection algorithms for undirected graphs. |
|
extern
Package extern provides graph algorithms that operate directly on a Tier 2 (mmap-backed) csrfile.Reader without first materialising the CSR in memory.
|
Package extern provides graph algorithms that operate directly on a Tier 2 (mmap-backed) csrfile.Reader without first materialising the CSR in memory. |
|
flow
Package flow implements network-flow algorithms over directed capacitated graphs.
|
Package flow implements network-flow algorithms over directed capacitated graphs. |
|
Package store provides the composed teardown owner that bundles a WAL-backed store's durability pieces — a wal.Writer and an optional background [checkpoint.Checkpointer] — and closes them in the single crash-safe order.
|
Package store provides the composed teardown owner that bundles a WAL-backed store's durability pieces — a wal.Writer and an optional background [checkpoint.Checkpointer] — and closes them in the single crash-safe order. |
|
bulk
Package bulk implements the bulk-loading path that bypasses the transactional WAL stack and writes a Tier 2 csrfile directly from a stream of edges.
|
Package bulk implements the bulk-loading path that bypasses the transactional WAL stack and writes a Tier 2 csrfile directly from a stream of edges. |
|
checkpoint
Package checkpoint runs a background goroutine that periodically folds the WAL tail into a fresh snapshot and truncates the WAL.
|
Package checkpoint runs a background goroutine that periodically folds the WAL tail into a fresh snapshot and truncates the WAL. |
|
csrfile
Package csrfile defines the on-disk binary format used by GoGraph's Tier 2 (out-of-core, mmap-backed) CSR storage.
|
Package csrfile defines the on-disk binary format used by GoGraph's Tier 2 (out-of-core, mmap-backed) CSR storage. |
|
recovery
Package recovery rebuilds the in-memory graph state from a snapshot (when present) plus the WAL tail, and exposes the harness used to fuzz crash semantics in tests.
|
Package recovery rebuilds the in-memory graph state from a snapshot (when present) plus the WAL tail, and exposes the harness used to fuzz crash semantics in tests. |
|
snapshot
Package snapshot serialises the durable on-disk representation of a gograph snapshot (CSR + LPG + schema) and reads it back into a fresh process.
|
Package snapshot serialises the durable on-disk representation of a gograph snapshot (CSR + LPG + schema) and reads it back into a fresh process. |
|
txn
Package txn provides the transactional surface (Begin / Commit / Rollback) layered over an lpg.Graph and a wal.Writer.
|
Package txn provides the transactional surface (Begin / Commit / Rollback) layered over an lpg.Graph and a wal.Writer. |
|
wal
Package wal implements a versioned, length-prefixed, CRC32C-checksummed Write-Ahead Log for the gograph durability stack.
|
Package wal implements a versioned, length-prefixed, CRC32C-checksummed Write-Ahead Log for the gograph durability stack. |