pb

package module
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 0 Imported by: 0

README

pb

Generated protobuf messages and Connect-Go service stubs for Lantern's wire format. Since #362 this is a Connect-only module — the legacy gRPC and grpc-gateway plugins have been removed. Connect handlers are still wire-compatible with gRPC and gRPC-Web clients on the same h2c socket, so existing tooling (grpcurl, ghz, gRPC SDKs) continues to work against the server without changes.

This module is the leaf of the Lantern dependency graph: both the server (github.com/anaregdesign/lantern/server) and the Go client SDK (github.com/anaregdesign/lantern/sdks/go) depend on it, but it depends on nothing else inside this repo. Keeping the wire contract in a standalone module means the server and the client never have to depend on each other to share a type.

Install

go get github.com/anaregdesign/lantern/pb@latest

Contents

Path Description
graph/v1/ Generated protobuf message types and enums (e.g. Vertex, Edge, Algorithm, Objective, Weighting) for the graph.v1 package.
graph/v1/graphv1connect/ Connect-Go handler and client interfaces for graph.v1.LanternService and graph.v1.LanternReplicationService.

The package name is pb for the root module marker and matches the go_package_prefix declared in buf.gen.yaml. The generated Go packages live under graph/v1 (package graph_v1) and graph/v1/graphv1connect (package graphv1connect).

Source of truth

The .proto files live at the repo root under proto/graph/v1/. The stubs in this module are regenerated by buf — never hand-edit anything under pb/.

To regenerate after editing the .proto sources, run from the repo root:

go generate ./...

This invokes buf generate (no --clean; that would delete pb/go.mod and pb/doc.go along with the stubs) and rewrites everything under pb/graph/v1 (both the protobuf messages and the Connect-Go stubs). buf itself does not need to be installed — the go:generate directive falls back to go run github.com/bufbuild/buf/cmd/buf@v1.70.0 automatically.

Versioning

Tagged independently as pb/vX.Y.Z. Because both the server and the SDK depend on it, pb is always tagged first in the release order:

pb/vX.Y.Z  →  core/vX.Y.Z  →  sdks/go/vX.Y.Z  →  vX.Y.Z (root)

See AGENTS.md for the full release checklist.

Stability

The graph.v1 package is the stable wire contract. Breaking changes (renamed fields, removed RPCs, changed semantics) are reserved for a future graph.v2 package — additions inside graph.v1 (new RPCs, new fields with proper proto numbering) are allowed under semver minor bumps.

Documentation

Overview

Package pb is a thin module that ships the generated protobuf messages and Connect-Go service stubs for the Lantern wire format. It sits at the bottom of the dependency graph so the server and the client SDK both depend on the same contract without depending on each other.

Directories

Path Synopsis
graph
v1

Jump to

Keyboard shortcuts

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