gocell

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 3 Imported by: 0

README

GoCell

Cell-native Go Engineering Foundation.

GoCell provides Cell/Slice runtime primitives, governance toolchain, and built-in Cells for building reliable Go services with the Slice-Cell architecture.

Quick Start (5 minutes)

The todoorder example requires JWT keys and a service secret for the internal listener. Run the commands from the repository root. If you have not cloned it yet:

git clone https://github.com/ghbvf/gocell.git
cd gocell

Then copy-paste the steps below in a single terminal:

# Step 1 — generate RS256 key pair
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 \
  -out /tmp/gocell-todoorder-jwt.key
openssl rsa -in /tmp/gocell-todoorder-jwt.key -pubout \
  -out /tmp/gocell-todoorder-jwt.pub

# Step 2 — set required env vars
export GOCELL_JWT_PRIVATE_KEY="$(cat /tmp/gocell-todoorder-jwt.key)"
export GOCELL_JWT_PUBLIC_KEY="$(cat /tmp/gocell-todoorder-jwt.pub)"
export GOCELL_JWT_ISSUER=todoorder-local
export GOCELL_JWT_AUDIENCE=gocell
export GOCELL_TODOORDER_SERVICE_SECRET="$(openssl rand -base64 32)"

# Step 3 — mint a test RS256 token (role:customer, signed by the local key)
# reads $GOCELL_JWT_PRIVATE_KEY/$GOCELL_JWT_ISSUER/$GOCELL_JWT_AUDIENCE from env
export TODOORDER_TOKEN="$(go run ./examples/todoorder/localtoken)"

# Step 4 — start the server (primary :8082, internal :9082, health 127.0.0.1:9092)
go run ./examples/todoorder &

# Step 5 — wait for readiness (#673: /healthz and /readyz live on the health listener)
until curl -fsS http://127.0.0.1:9092/readyz >/dev/null; do sleep 0.2; done

# Step 6 — exercise the API
curl -s -X POST http://localhost:8082/api/v1/orders/ \
  -H "Authorization: Bearer $TODOORDER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"item":"my first order"}' | jq .

curl -s http://localhost:8082/api/v1/orders/ \
  -H "Authorization: Bearer $TODOORDER_TOKEN" | jq .

Check the application logs — you should see event.order.created consumed.

For full configuration options (production hardening, real-mode adapters, multi-pod), see examples/todoorder/README.md.

For a full local Docker stack (PostgreSQL + Redis + corebundle), see Local Docker Deploy guide.

Core Concepts

┌─────────────────────────────────────────────────┐
│  Assembly        (physical deployment unit)      │
│  ┌────────────┐  ┌────────────┐  ┌────────────┐ │
│  │ Cell       │  │ Cell       │  │ Cell       │ │
│  │ ┌────────┐ │  │ ┌────────┐ │  │ ┌────────┐ │ │
│  │ │ Slice  │ │  │ │ Slice  │ │  │ │ Slice  │ │ │
│  │ └────────┘ │  │ └────────┘ │  │ └────────┘ │ │
│  │ ┌────────┐ │  │ ┌────────┐ │  │ ┌────────┐ │ │
│  │ │ Slice  │ │  │ │ Slice  │ │  │ │ Slice  │ │ │
│  │ └────────┘ │  │ └────────┘ │  │ └────────┘ │ │
│  └──────┬─────┘  └──────┬─────┘  └──────┬─────┘ │
│         └───── Contract ─┘───── Contract ┘       │
└─────────────────────────────────────────────────┘
Concept Description
Cell Independent domain unit with lifecycle (Init/Start/Stop/Health). Types: core, edge, support.
Slice A single responsibility within a Cell (e.g., sessionlogin, ordercreate).
Contract Cross-Cell communication boundary (HTTP, event, command). Cells never import each other directly.
Assembly Physical deployment — groups Cells into a runnable binary.
Journey End-to-end acceptance specification spanning multiple Cells and Contracts.
Consistency Levels (L0-L4)
Level Name Pattern Example
L0 LocalOnly Single slice, no side effects Validation, computation
L1 LocalTx Single cell transaction Session creation
L2 OutboxFact Transaction + outbox event Order creation + event publish
L3 WorkflowEventual Cross-cell eventual consistency Audit trail, projections
L4 DeviceLatent High-latency device loop Command → ack with timeout

30-Minute Tutorial: Create Your First Cell (codegen-driven)

GoCell uses codegen to eliminate boilerplate. The workflow is: define contract.yaml → run gocell generate contract → import the generated handler.

For a deeper walkthrough see docs/guides/codegen-new-endpoint.md.

Step 1: Scaffold metadata
mkdir -p contracts/http/mycell/hello/v1
mkdir -p cells/mycell/slices/myhello

Create contracts/http/mycell/hello/v1/contract.yaml:

id: http.mycell.hello.v1
kind: http
ownerCell: mycell
consistencyLevel: L0
lifecycle: active
endpoints:
  server: mycell
  clients: []          # external callers (cell ids or actor ids); empty = open API
  http:
    method: GET
    path: /api/v1/hello
    successStatus: 200
    noContent: false   # true only for endpoints whose contract returns no body (e.g. 204 DELETE)
    auth:
      public: true     # JWT-exempt; mutually exclusive with passwordResetExempt (FMT-26)
schemaRefs:
  response: response.schema.json

Create contracts/http/mycell/hello/v1/response.schema.json:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": { "message": { "type": "string" } },
  "required": ["message"]
}

Create cells/mycell/cell.yaml:

id: mycell
type: core
consistencyLevel: L0
owner:
  team: my-team
  role: my-owner
verify:
  smoke:
    - mycell/smoke

Create cells/mycell/slices/myhello/slice.yaml:

id: myhello
belongsToCell: mycell
consistencyLevel: L1
contractUsages:
  - contract: http.mycell.hello.v1
    role: serve
verify:
  unit: myhello/unit
  contract: myhello/contract
allowedFiles:
  - handler.go
Step 2: Generate the contract handler
go run ./cmd/gocell generate contract
# → generated/contracts/http/mycell/hello/v1/types_gen.go
# → generated/contracts/http/mycell/hello/v1/iface_gen.go
# → generated/contracts/http/mycell/hello/v1/handler_gen.go
Step 3: Implement the Service interface

Create cells/mycell/slices/myhello/handler.go:

package myhello

import (
    "context"

    hellog "github.com/ghbvf/gocell/generated/contracts/http/mycell/hello/v1"
    kcell "github.com/ghbvf/gocell/kernel/cell"
)

// HelloAdapter implements hellog.Service for http.mycell.hello.v1.
type HelloAdapter struct{}

func (HelloAdapter) Hello(ctx context.Context, _ *hellog.Request) (*hellog.Response, error) {
    return &hellog.Response{Message: "hello from mycell"}, nil
}

// Handler wires the generated contract handler for the myhello slice.
type Handler struct{ h *hellog.Handler }

func NewHandler() *Handler {
    return &Handler{h: hellog.NewHandler(HelloAdapter{})}
}

func (h *Handler) RegisterRoutes(mux kcell.RouteHandler) error {
    return h.h.RegisterRoutes(mux)
}
Step 4: Implement the Cell

Cell metadata and Init wiring are produced by codegen from cell.yaml — set goStructName: MyCell in the yaml and run go run ./cmd/gocell generate cell --all to emit cells/mycell/cell_gen.go (the file holds the metadata.CellMeta{} literal plus a generated Init that drains markers).

Hand-write only cells/mycell/cell.go:

package mycell

import (
    "context"
    "net/http"

    "github.com/ghbvf/gocell/cells/mycell/slices/myhello"
    "github.com/ghbvf/gocell/kernel/cell"
    "github.com/ghbvf/gocell/runtime/auth"
)

// +cell:listener:ref=cell.PrimaryListener,prefix=/api/v1
type MyCell struct {
    *cell.BaseCell

    // +slice:route:slice=myhello,subPath=
    helloH *myhello.Handler
}

func New() *MyCell {
    return &MyCell{
        BaseCell: cell.MustNewBaseCell(loadCellMetadata()),
        helloH:   myhello.NewHandler(),
    }
}

// initInternal is the hand-written init hook called from cell_gen.go after
// BaseCell.Init runs. Wire dependencies (DB, clients, workers) here.
func (c *MyCell) initInternal(ctx context.Context, reg cell.Registrar) error {
    return nil
}

// Compile-time assertion: MyCell satisfies all four ISP sub-interfaces.
// Forgetting a method pinpoints the missing sub-interface (e.g.,
// "missing method Stop" surfaces as "does not implement CellLifecycle").
// ref: docs/architecture/202605101800-adr-cell-interface-isp-split.md §D3
var (
    _ cell.CellIdentity  = (*MyCell)(nil)
    _ cell.CellLifecycle = (*MyCell)(nil)
    _ cell.CellStatus    = (*MyCell)(nil)
    _ cell.CellInventory = (*MyCell)(nil)
)

The +cell:listener / +slice:route markers tell cellgen how to emit cell_gen.go::Init, which calls BaseCell.Init, then c.initInternal, then registers each route group + slice. Re-run gocell generate cell --all after changing markers.

Step 5: Create a main.go
package main

import (
    "context"
    "os/signal"
    "syscall"

    mycell "github.com/ghbvf/gocell/cells/mycell"
    "github.com/ghbvf/gocell/kernel/auth"
    "github.com/ghbvf/gocell/kernel/assembly"
    "github.com/ghbvf/gocell/kernel/cell"
    "github.com/ghbvf/gocell/kernel/clock"
    "github.com/ghbvf/gocell/kernel/outbox"
    "github.com/ghbvf/gocell/runtime/bootstrap"
)

func main() {
    ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
    defer cancel()

    clk := clock.Real()
    asm := assembly.New(clk, assembly.Config{ID: "myapp", DurabilityMode: outbox.DurabilityDemo})
    asm.Register(mycell.New())

    app := bootstrap.New(
        clk,
        bootstrap.WithAssembly(asm),
        // QUICKSTART ONLY — auth.AuthNone disables JWT entirely on the public
        // listener. Production wires `auth.NewAuthJWTFromAssembly(asm)` here
        // (PrimaryListener) and `auth.NewAuthServiceToken(store, ring)` on
        // InternalListener; see docs/guides/cell-development-guide.md.
        bootstrap.WithListener(cell.PrimaryListener, ":8080",
            []auth.ListenerAuth{auth.AuthNone{}}),
        bootstrap.WithListener(cell.HealthListener, "127.0.0.1:9091",
            []auth.ListenerAuth{auth.AuthNone{}}), // loopback-isolated
    )
    app.Run(ctx)
}
Step 6: Build and run
go run ./cmd/gocell validate      # verify contracts are well-formed
go build ./cmd/myapp && ./myapp
# In another terminal:
curl http://localhost:8080/api/v1/hello
# {"message":"hello from mycell"}
Further Reading

Scaffold(K#09)

一键创建完整 cell bundle:

gocell scaffold cell --id=foo --team=platform --role=cell-owner

生成 cells/foo/ 含 cell.go + cell.yaml + slice + contract + JSON schemas,并自动 codegen 让 go test ./cells/foo/... 立即通过。

一键创建 assembly:

gocell scaffold assembly --id=bar --cells=foo --team=platform --role=admin --deploy=k8s

生成 assemblies/bar/assembly.yaml + cmd/bar/{run,app,modules_gen,main}.go + boundary.yaml

详见 ADR docs/architecture/202605101430-adr-scaffold-one-cmd-double-source-removal.md

Example Projects

Example Complexity What it demonstrates
todoorder Medium Custom Cell, CRUD, outbox event publish, RabbitMQ consume
ssobff Medium-High 3 built-in Cells composition (access + audit + config)
iotdevice High L4 DeviceLatent: command queue, ack, high-latency loop

The ssobff example demonstrates the initial admin bootstrap path: an operator hits POST /api/v1/access/setup/admin on the primary listener, protected by HTTP Basic Auth using GOCELL_BOOTSTRAP_ADMIN_USERNAME / GOCELL_BOOTSTRAP_ADMIN_PASSWORD (persistent operator credentials, required at startup). The endpoint body carries the actual admin identity (username / email / password, 8-72 printable ASCII). See docs/ops/first-run-setup.md for the env contract and password-reset flow, and docs/architecture/202605061600-adr-bootstrap-admin-boundary.md for the security boundary ADR.

Runtime Modes

GoCell assemblies must declare a DurabilityMode explicitly (zero value is rejected):

Mode Value Noop Allowed Use Case
DurabilityDemo 1 Yes — NoopWriter, outbox.DemoTxRunner, DiscardPublisher accepted; missing Tx/outbox dependencies are completed with explicit no-op defaults Development, unit tests, examples
DurabilityDurable 2 No — CheckNotNoop rejects at Init() and L2 Cells require a real outbox writer + Tx runner Production storage topologies
// Production
asm := assembly.New(clock.Real(), assembly.Config{ID: "prod", DurabilityMode: outbox.DurabilityDurable})

// Development / tests
asm := assembly.New(clock.Real(), assembly.Config{ID: "dev", DurabilityMode: outbox.DurabilityDemo})

cmd/corebundle maps PostgreSQL storage topology to DurabilityDurable; development and memory storage topologies use DurabilityDemo so examples can run without a database or broker. Demo mode is explicit: Cells inject outbox.DemoTxRunner / NoopEmitter when dependencies are absent, or a direct outbox.Emitter when a publisher is supplied without a durable writer. Durable mode never silently falls back to those no-op dependencies.

Architecture

kernel/       — Cell/Slice runtime + governance tools (framework core)
cells/        — Platform Cell implementations (accesscore / auditcore / configcore)
contracts/    — Platform cross-Cell boundary contracts ({kind}/{domain}/{version}/)
journeys/     — Platform Journey acceptance specs + status-board.yaml
runtime/      — HTTP middleware, auth, worker, observability, bootstrap
adapters/     — External system adapters (postgres / redis / rabbitmq / websocket / s3 / oidc)
pkg/          — Shared utilities (errcode / ctxkeys / httputil / query)
cmd/          — CLI (gocell validate [--strict] / scaffold / generate / check / verify)
examples/     — Example projects; may include example-local cells/contracts/journeys
templates/    — Project templates (ADR / cell-design / contract-review / runbook / postmortem / grafana)
generated/    — Tool-generated artifacts (indexes, derived views)
Layer Dependencies
kernel/    ← stdlib + pkg/ + gopkg.in/yaml.v3 (no runtime, adapters, cells)
runtime/   ← kernel/ + pkg/ (no cells, adapters)
cells/     ← kernel/ + runtime/ (no adapters — interface decoupling)
adapters/  ← kernel/ + runtime/ + pkg/ + external libs (no cells)
examples/  ← all layers
Verification Gates

Architectural and security invariants are enforced by static gates that run in CI (make verify) and can be reproduced locally:

Gate Script / Test Enforces
PROD-CLOCK-INJECTION-01 tools/archtest TestProdClockInjection Production code must inject kernel/clock.Clock; stdlib time.Now / Since / Until / NewTimer / NewTicker / After / AfterFunc / Tick / Sleep are forbidden outside leaf adapters
KERNEL-CLOCK-LEAF-FALLBACK-01 tools/archtest TestKernelClockLeafFallback Leaf code must not silently default to clock.Real() — composition root must inject explicitly
KERNEL-CLOCK-RESET-RELATIVE-PROD-01 tools/archtest TestKernelClockResetRelativeProd Production code must use Timer.ResetAt(deadline) rather than Timer.Reset(d duration) to eliminate read-then-act race
CLOCK-POSITIONAL-INJECTION-01 tools/archtest TestClockPositionalInjection Downstream Hard: bans MustHaveClock selector args and clock option-injectors (any exported With*Clock function). Clock is a mandatory first positional parameter; the compiler enforces its presence.
PROD-CLOCKMOCK-IMPORT-01 .golangci.yml depguard rule clockmock-test-only Production code must not import kernel/clock/clockmock (test-helper packages under **/testutil/ and **/storetest/ are exempt)
LAYER-01..04 .golangci.yml depguard rules kernel/pkg/runtime/adapters-isolation Layered import boundaries (kernel ⇏ runtime/adapters/cells, etc.)
SUPPLY-CHAIN-VULN hack/verify-supply-chain-clean.sh, govulncheck, gosec, Semgrep, CodeQL Vulnerable dependencies + insecure code patterns
SHELL-SAFETY-01 hack/verify-shell-safety.sh All hack/*.sh scripts use set -euo pipefail

Convenience aggregator: bash hack/verify-archtest-invariants.sh runs the clock-injection, duration-const, test-time-literal, and panic-registered gates in one shot (~33s, shared-resolver).

Built-in Cells

  • accesscore — Identity management, JWT session lifecycle (RS256), RBAC authorization (9 Slices)
  • auditcore — Tamper-proof audit trail with HMAC-SHA256 hash chain (4 Slices)
  • configcore — Configuration management with versioning, publishing, and feature flags (6 Slices)

Adapters

Adapter Capabilities Kernel Interface
adapters/postgres Pool, TxManager, Migrator (goose v3), OutboxWriter, PGOutboxStore outbox.Writer, outbox.BatchWriter, runtime/outbox.Store
adapters/redis Client, DistLock, IdempotencyClaimer, Cache idempotency.Claimer
adapters/oidc Thin go-oidc v3 wrapper (Config, Provider, Refresh, Verifier, OAuth2Config)
adapters/s3 Thin aws-sdk-go-v2 wrapper (Config, Upload, Health, SDK escape hatch)
adapters/rabbitmq Publisher, Subscriber, ConsumerBase (DLQ + retry) outbox.Publisher, outbox.Subscriber
adapters/websocket WebSocket Hub, signal-first push
adapters/otel OTel SDK tracer + MetricProvider + pool collector (OTLP gRPC exporter, semconv db.client.connection.*) kernel/wrapper.Tracer, kernel/observability/metrics.Provider
adapters/prometheus MetricProvider (backs runtime/outbox collectors) + LifecycleHookObserver kernel/observability/metrics.Provider, cell.LifecycleHookObserver
Outbox Wiring

The transactional outbox is split across three layers — Cell services depend on persistence.TxRunner + outbox.Emitter, store + relay loop lives in runtime/outbox, and persistence lives in adapters/postgres:

clk := clock.Real()

// 1. Adapt the durable writer at the Cell boundary.
emitter, err := outbox.NewWriterEmitter(postgres.NewOutboxWriter(clk))
if err != nil {
    return err
}

// 2. Service code writes business state + emits inside the same transaction.
err = txRunner.RunInTx(ctx, func(txCtx context.Context) error {
    // ... write business state ...
    return emitter.Emit(txCtx, entry)
})

// 3. Compose the relay at bootstrap (cmd/corebundle, examples, etc.)
store := postgres.NewOutboxStore(pool.DB(), clk)
relay := outbox.NewRelay(clk, store, publisher, outbox.DefaultRelayConfig())
// relay implements worker.Worker — register with bootstrap to manage lifecycle.

Direct-publish demo paths use outbox.NewDirectEmitter; durable writer and direct publisher paths both marshal the same kernel/outbox v1 wire envelope. runtime/outbox owns relay/store runtime state only.

runtime/outbox defines the SQL-dialect-neutral Store interface (ClaimPending / MarkPublished / MarkRetry / MarkDead / ReclaimStale / CleanupPublished / CleanupDead / OldestEligibleAt) and the Relay worker that owns the poll / reclaim / cleanup goroutines. Cleanup is data-driven: it sleeps until the next published / dead row crosses its retention window, so an idle table costs zero DB cycles.

Outbox Observability Bridge

For HTTP flows that publish through the transactional outbox, GoCell now bridges requestId, correlationId, and optional traceId from handler context into outbox.Entry.Observability on the write path. When the event is consumed, SubscriberWithMiddleware.SubscribeEntry restores those keys into the consumer handler context before business code runs.

Consumer setup now has two composition contracts. Subscription-bearing bootstrap applications must configure WithConsumerBase; phase6 fails fast without it so idempotency and broker settlement are explicit:

clk := clock.Real()

cb, err := outbox.NewConsumerBase(
    idempotency.NewInMemClaimer(clk),
    outbox.ConsumerBaseConfig{},
    clk,
)
if err != nil {
    panic(err)
}

app := bootstrap.New(
    clk,
    bootstrap.WithSubscriber(rawSub),
    bootstrap.WithConsumerBase(cb),
    bootstrap.WithTracer(tracer),
)

Bootstrap automatically decorates the subscriber with eventrouter.NewContractTracingSubscriber(rawSub, tracer), so consumer spans end after final broker settlement (ack, requeue, commit_failed, retry_exhausted). For non-bootstrap usage, call SubscriberWithMiddleware.SubscribeEntry rather than the raw subscriber when consuming business handlers, and include the same subscriber decorator when final-settlement tracing is required:

tracedSub := eventrouter.NewContractTracingSubscriber(rawSub, tracer)
wrappedSub := &outbox.SubscriberWithMiddleware{
    Inner:        tracedSub,
    Middleware:   businessMiddleware,
    ConsumerBase: cb,
}
err := wrappedSub.SubscribeEntry(ctx, sub, handler)

Raw Subscriber.Subscribe is reserved for adapter/test delivery paths; it bypasses business middleware, ConsumerBase, observability restoration, and final-settlement tracing. When HTTP tracing is enabled, GoCell now extracts inbound traceparent and b3 headers before starting the server span so synchronous service hops preserve the same trace_id. Note: span_id is intentionally excluded across async boundaries — spans do not cross the outbox hop.

Trace Propagation

When HTTP tracing is enabled via WithTracer, GoCell automatically extracts inbound W3C traceparent and B3 headers before starting the server span. W3C takes precedence; B3 is used only as a fallback. Invalid or missing headers safely degrade to a new root trace.

Enablement — tracing is opt-in via bootstrap.WithTracer or router.WithTracer:

// bootstrap (recommended) — production wires the OTel adapter.
// otel.NewTracer returns (*otel.Tracer, shutdown func(context.Context) error, error).
tracer, shutdown, err := otel.NewTracer(ctx, otel.TracerConfig{ServiceName: "my-service"})
if err != nil { /* handle */ }
defer shutdown(context.Background())

clk := clock.Real()
jwtAuth, err := auth.NewAuthJWTFromAssembly(asm)
if err != nil { /* handle */ }
app := bootstrap.New(
    clk,
    bootstrap.WithAssembly(asm),
    bootstrap.WithListener(cell.PrimaryListener, ":8080",
        []auth.ListenerAuth{jwtAuth}),
    bootstrap.WithTracer(tracer), // tracer is a kernel/wrapper.Tracer
)

// router (standalone)
r, err := router.New(clk, router.WithTracer(tracer))
if err != nil { /* handle */ }

Without WithTracer, span creation falls back to wrapper.NoopTracer{}. Tests that need inspectable trace/span IDs use the in-process fixture runtime/observability/tracingtest.NewSimpleTracer("svc") (test-only — archtest TRACING-SIMPLETRACER-TEST-ONLY-01 bans it from production).

Trust assumption: trace header propagation assumes a trusted-upstream deployment (service-to-service behind a gateway or mesh). Public-facing edges should sanitize or ignore inbound trace headers at the gateway layer. See the TRUST-POLICY-01 backlog issue (GitHub Issues / Project v2 #3) for the planned public-endpoint strategy.

Framework-emitted consumer logs pick up these fields when the process uses GoCell's context-aware slog handler. This branch does not make plain slog JSON handlers automatically extract request_id, correlation_id, or trace_id (slog log-key naming, intentionally snake_case per observability.md; the corresponding wire JSON envelope fields are camelCase: requestId, correlationId, traceId). Values restored from broker metadata are validated for safe characters and length before injection into context.

Using in Your Project

# Set up Go private module access
export GOPRIVATE=github.com/ghbvf/gocell

# Add to your project
go get github.com/ghbvf/gocell@latest

Project Templates

GoCell includes templates for common engineering documents:

  • templates/adr.md — Architecture Decision Record
  • templates/cell-design.md — Cell design document
  • templates/contract-review.md — Contract review checklist
  • templates/runbook.md — Operations runbook
  • templates/postmortem.md — Incident postmortem
  • templates/grafana-dashboard.json — Grafana monitoring dashboard

License

MIT

Documentation

Overview

Package gocell provides the top-level entry point for the GoCell framework.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAssembly

func NewAssembly(id string) *assembly.CoreAssembly

NewAssembly creates a new CoreAssembly with the given identifier.

Types

This section is empty.

Directories

Path Synopsis
adapters
adapterutil
Package adapterutil centralizes shared plumbing helpers used by GoCell adapters (postgres / redis / rabbitmq / vault).
Package adapterutil centralizes shared plumbing helpers used by GoCell adapters (postgres / redis / rabbitmq / vault).
circuitbreaker
Package circuitbreaker provides an in-process three-state circuit breaker (closed/half-open/open) that implements the runtime/http/middleware.Allower interface.
Package circuitbreaker provides an in-process three-state circuit breaker (closed/half-open/open) that implements the runtime/http/middleware.Allower interface.
grpc
Package grpc provides the GoCell gRPC server adapter.
Package grpc provides the GoCell gRPC server adapter.
mqtt
Package mqtt is the GoCell MQTT v5 adapter.
Package mqtt is the GoCell MQTT v5 adapter.
mqtt/internal/topicns
Package topicns owns MQTT topic-namespace validation and the sealed publish/subscribe token types.
Package topicns owns MQTT topic-namespace validation and the sealed publish/subscribe token types.
oidc
Package oidc provides a thin adapter over coreos/go-oidc v3 and golang.org/x/oauth2 for OpenID Connect authentication.
Package oidc provides a thin adapter over coreos/go-oidc v3 and golang.org/x/oauth2 for OpenID Connect authentication.
otel
Package otel provides an OpenTelemetry adapter that implements the kernel/wrapper.Tracer interface using the OTel SDK.
Package otel provides an OpenTelemetry adapter that implements the kernel/wrapper.Tracer interface using the OTel SDK.
otel/internal/otelwrap
Package otelwrap is the sole sanctioned funnel for invoking OpenTelemetry metric.Meter instrument constructors.
Package otelwrap is the sole sanctioned funnel for invoking OpenTelemetry metric.Meter instrument constructors.
postgres
Package postgres provides a PostgreSQL adapter for the GoCell framework.
Package postgres provides a PostgreSQL adapter for the GoCell framework.
postgres/internal/pgexec
Package pgexec is the sealed PostgreSQL executor funnel for adapters/postgres.
Package pgexec is the sealed PostgreSQL executor funnel for adapters/postgres.
postgres/saga
Package saga implements kernel/saga/journal.Journal over PostgreSQL.
Package saga implements kernel/saga/journal.Journal over PostgreSQL.
postgres/saga/internal/pgexec
Package pgexec is the sealed PostgreSQL executor funnel for the saga adapter.
Package pgexec is the sealed PostgreSQL executor funnel for the saga adapter.
prometheus
Package prometheus provides a Prometheus backend for the provider-neutral metrics abstraction defined in kernel/observability/metrics, plus a direct cell.LifecycleHookObserver implementation for assembly hook metrics.
Package prometheus provides a Prometheus backend for the provider-neutral metrics abstraction defined in kernel/observability/metrics, plus a direct cell.LifecycleHookObserver implementation for assembly hook metrics.
prometheus/internal/promwrap
Package promwrap is the sole sanctioned funnel for constructing Prometheus client_golang instruments.
Package promwrap is the sole sanctioned funnel for constructing Prometheus client_golang instruments.
rabbitmq
Package rabbitmq provides a RabbitMQ adapter for the GoCell event bus.
Package rabbitmq provides a RabbitMQ adapter for the GoCell event bus.
ratelimit
Package ratelimit provides a token-bucket rate limiter adapter that implements the runtime/http/middleware.RateLimiter and WindowedRateLimiter interfaces using golang.org/x/time/rate.
Package ratelimit provides a token-bucket rate limiter adapter that implements the runtime/http/middleware.RateLimiter and WindowedRateLimiter interfaces using golang.org/x/time/rate.
redis
Package redis provides a Redis adapter for the GoCell framework.
Package redis provides a Redis adapter for the GoCell framework.
s3
Package s3 provides a thin adapter over aws-sdk-go-v2 for S3-compatible object storage.
Package s3 provides a thin adapter over aws-sdk-go-v2 for S3-compatible object storage.
vault
Package vault provides a HashiCorp Vault Transit adapter that implements the kernel/crypto.KeyProvider interface.
Package vault provides a HashiCorp Vault Transit adapter that implements the kernel/crypto.KeyProvider interface.
websocket
Package websocket provides a github.com/coder/websocket binding for the runtime/websocket.Conn interface.
Package websocket provides a github.com/coder/websocket binding for the runtime/websocket.Conn interface.
cellmodules
accesscore
Package accesscore is the platform composition module for the accesscore Cell.
Package accesscore is the platform composition module for the accesscore Cell.
auditcore
Package auditcore is the platform composition module for the auditcore Cell.
Package auditcore is the platform composition module for the auditcore Cell.
cellsecrets
Package cellsecrets provides helpers shared across the cellmodules/ cell modules (accesscore, auditcore, configcore) and cmd/corebundle.
Package cellsecrets provides helpers shared across the cellmodules/ cell modules (accesscore, auditcore, configcore) and cmd/corebundle.
configcore
Package configcore is the platform composition module for the configcore Cell.
Package configcore is the platform composition module for the configcore Cell.
cells
accesscore
Package accesscore implements the accesscore Cell: identity management, session lifecycle (login/refresh/logout/validate), RBAC authorization, and role queries.
Package accesscore implements the accesscore Cell: identity management, session lifecycle (login/refresh/logout/validate), RBAC authorization, and role queries.
accesscore/accesscoretest
Package accesscoretest provides public test-infrastructure helpers for the accesscore cell.
Package accesscoretest provides public test-infrastructure helpers for the accesscore cell.
accesscore/configgetter
Package configgetter wires accesscore ConfigGetter adapters.
Package configgetter wires accesscore ConfigGetter adapters.
accesscore/internal/abac
Package abac is the ABAC (Attribute-Based Access Control) policy authoring and persistence model for accesscore.
Package abac is the ABAC (Attribute-Based Access Control) policy authoring and persistence model for accesscore.
accesscore/internal/accountlockout
Package accountlockout is the typed mediator that drives auto-lockout decisions for sessionlogin.
Package accountlockout is the typed mediator that drives auto-lockout decisions for sessionlogin.
accesscore/internal/adapters/http
Package http provides HTTP adapter implementations for accesscore's outbound cross-cell calls.
Package http provides HTTP adapter implementations for accesscore's outbound cross-cell calls.
accesscore/internal/adapters/postgres/internal/pgexec
Package pgexec is the sealed PostgreSQL executor funnel for the accesscore adapter.
Package pgexec is the sealed PostgreSQL executor funnel for the accesscore adapter.
accesscore/internal/adminprovision
Package adminprovision encapsulates the idempotent, race-safe "bring the first admin into existence" domain logic.
Package adminprovision encapsulates the idempotent, race-safe "bring the first admin into existence" domain logic.
accesscore/internal/authzmutate
Package authzmutate is the single entry point for all authz-field mutations on a User aggregate.
Package authzmutate is the single entry point for all authz-field mutations on a User aggregate.
accesscore/internal/credential
Package credential is the single sanctioned holder of accesscore password hashing.
Package credential is the single sanctioned holder of accesscore password hashing.
accesscore/internal/credentialauthority
Package credentialauthority is the read-side funnel for "is this user-bound credential authorized to issue or continue using a session?" decisions.
Package credentialauthority is the read-side funnel for "is this user-bound credential authorized to issue or continue using a session?" decisions.
accesscore/internal/credentialinvalidate
Package credentialinvalidate is the single entry point for credential revocation events: it bumps the user's authz_epoch, revokes all active sessions, and revokes all refresh chains in one ambient transaction.
Package credentialinvalidate is the single entry point for credential revocation events: it bumps the user's authz_epoch, revokes all active sessions, and revokes all refresh chains in one ambient transaction.
accesscore/internal/domain
Package domain contains the accesscore Cell domain models.
Package domain contains the accesscore Cell domain models.
accesscore/internal/dto
Package dto contains accesscore's local typed views of cross-cell event payloads.
Package dto contains accesscore's local typed views of cross-cell event payloads.
accesscore/internal/httpcookie
Package httpcookie delivers the accesscore refresh token as an httpOnly cookie on the session endpoints (login / refresh / logout) and reads it back on refresh.
Package httpcookie delivers the accesscore refresh token as an httpOnly cookie on the session endpoints (login / refresh / logout) and reads it back on refresh.
accesscore/internal/mem
Package mem provides in-memory repository implementations for accesscore.
Package mem provides in-memory repository implementations for accesscore.
accesscore/internal/mem/internal/txlock
Package txlock mints un-forgeable, self-invalidating lock-ownership leases for the mem accesscore store.
Package txlock mints un-forgeable, self-invalidating lock-ownership leases for the mem accesscore store.
accesscore/internal/ports
Package ports defines accesscore's outbound dependency interfaces.
Package ports defines accesscore's outbound dependency interfaces.
accesscore/internal/ports/conformance
Package conformance defines a UserRepository contract acceptance suite shared by all ports.UserRepository implementations (mem, PG, future).
Package conformance defines a UserRepository contract acceptance suite shared by all ports.UserRepository implementations (mem, PG, future).
accesscore/internal/scopedtx
Package scopedtx funnels every tenant-scoped accesscore write (and tenant-scoped read inside a transaction) through a single tenant.WithScope + RunInTx wrapper.
Package scopedtx funnels every tenant-scoped accesscore write (and tenant-scoped read inside a transaction) through a single tenant.WithScope + RunInTx wrapper.
accesscore/internal/sessionmint
Package sessionmint centralizes access-JWT issuance so that login, IssueForUser (change-password flow), and refresh share a single fail-closed "fetch roles → sign access" pipeline.
Package sessionmint centralizes access-JWT issuance so that login, IssueForUser (change-password flow), and refresh share a single fail-closed "fetch roles → sign access" pipeline.
accesscore/internal/testutil
Package testutil provides shared test fixtures for cells/accesscore tests.
Package testutil provides shared test fixtures for cells/accesscore tests.
accesscore/mem
Package mem exposes the typed funnel for mem-backed accesscore wiring.
Package mem exposes the typed funnel for mem-backed accesscore wiring.
accesscore/postgres
Package postgres exposes the typed funnel for PostgreSQL-backed accesscore wiring.
Package postgres exposes the typed funnel for PostgreSQL-backed accesscore wiring.
accesscore/slices/authorizationdecide
Package authorizationdecide implements the authorization-decide slice: RBAC-based authorization decisions.
Package authorizationdecide implements the authorization-decide slice: RBAC-based authorization decisions.
accesscore/slices/configreceive
Package configreceive implements the config-receive slice: consumes config state-sync events from configcore.
Package configreceive implements the config-receive slice: consumes config state-sync events from configcore.
accesscore/slices/identitymanage
Package identitymanage implements the identity-manage slice: CRUD + Lock/Unlock user accounts.
Package identitymanage implements the identity-manage slice: CRUD + Lock/Unlock user accounts.
accesscore/slices/rbaccheck
Package rbaccheck implements the rbac-check slice: HasRole / ListRoles queries for a given user.
Package rbaccheck implements the rbac-check slice: HasRole / ListRoles queries for a given user.
accesscore/slices/sessionlogin
Package sessionlogin implements the session-login slice: password-based login with JWT access token and opaque refresh token issuance.
Package sessionlogin implements the session-login slice: password-based login with JWT access token and opaque refresh token issuance.
accesscore/slices/sessionlogout
Package sessionlogout implements the session-logout slice: revokes sessions and publishes revocation events.
Package sessionlogout implements the session-logout slice: revokes sessions and publishes revocation events.
accesscore/slices/sessionrefresh
Package sessionrefresh implements the session-refresh slice: validates an opaque refresh token via refresh.Store and issues a fresh access JWT.
Package sessionrefresh implements the session-refresh slice: validates an opaque refresh token via refresh.Store and issues a fresh access JWT.
accesscore/slices/sessionvalidate
Package sessionvalidate implements the session-validate slice: verifies access tokens and returns Claims.
Package sessionvalidate implements the session-validate slice: verifies access tokens and returns Claims.
accesscore/slices/setup
Package setup implements the interactive first-run admin provisioning slice.
Package setup implements the interactive first-run admin provisioning slice.
auditcore
Package auditcore implements the auditcore Cell: tamper-evident audit log with hash chain (via runtime/audit/ledger framework), event consumption, and query.
Package auditcore implements the auditcore Cell: tamper-evident audit log with hash chain (via runtime/audit/ledger framework), event consumption, and query.
auditcore/auditcoretest
Package auditcoretest provides testutil helpers for the auditcore Cell.
Package auditcoretest provides testutil helpers for the auditcore Cell.
auditcore/internal/appender
Package appender is the single-source implementation of the auditcore audit-append behavior, shared by the four slice packages auditappend{user,config,session,role}.
Package appender is the single-source implementation of the auditcore audit-append behavior, shared by the four slice packages auditappend{user,config,session,role}.
auditcore/internal/dto
Package dto holds typed payload structs for auditcore event contracts.
Package dto holds typed payload structs for auditcore event contracts.
auditcore/slices/auditappendbootstrap
Package auditappendbootstrap is the audit-append-bootstrap slice: it consumes event.auth.bootstrap-failed.v1 events and appends them to the bootstrap audit ledger via runtime/audit.AppendBootstrapAuthFail.
Package auditappendbootstrap is the audit-append-bootstrap slice: it consumes event.auth.bootstrap-failed.v1 events and appends them to the bootstrap audit ledger via runtime/audit.AppendBootstrapAuthFail.
auditcore/slices/auditappendconfig
Package auditappendconfig is the audit-append-config slice: it consumes config-change events and appends them to the audit ledger.
Package auditappendconfig is the audit-append-config slice: it consumes config-change events and appends them to the audit ledger.
auditcore/slices/auditappendrole
Package auditappendrole is the audit-append-role slice: it consumes role assignment events and appends them to the audit ledger.
Package auditappendrole is the audit-append-role slice: it consumes role assignment events and appends them to the audit ledger.
auditcore/slices/auditappendsession
Package auditappendsession is the audit-append-session slice: it consumes session lifecycle events and appends them to the audit ledger.
Package auditappendsession is the audit-append-session slice: it consumes session lifecycle events and appends them to the audit ledger.
auditcore/slices/auditappenduser
Package auditappenduser is the audit-append-user slice: it consumes user lifecycle events and appends them to the audit ledger.
Package auditappenduser is the audit-append-user slice: it consumes user lifecycle events and appends them to the audit ledger.
auditcore/slices/auditquery
Package auditquery implements the audit-query slice: query audit entries via HTTP using ledger.Store.
Package auditquery implements the audit-query slice: query audit entries via HTTP using ledger.Store.
configcore
Package configcore implements the configcore Cell: configuration management with versioning, publishing, rollback, and feature flag evaluation.
Package configcore implements the configcore Cell: configuration management with versioning, publishing, rollback, and feature flag evaluation.
configcore/configcoretest
Package configcoretest provides testutil builders and fakes for the configcore cell.
Package configcoretest provides testutil builders and fakes for the configcore cell.
configcore/internal/adapters/postgres
Package postgres provides a PostgreSQL implementation of configcore ports.
Package postgres provides a PostgreSQL implementation of configcore ports.
configcore/internal/configreader
Package configreader holds the shared config-read business logic (GetByKey / List) consumed by two sibling slices that sit on different HTTP trust boundaries: the public-facing `configread` slice (GET + list under /api/v1, admin-gated) and the internal control-plane `configreadinternal` slice (GET under /internal/v1, caller-cell gated).
Package configreader holds the shared config-read business logic (GetByKey / List) consumed by two sibling slices that sit on different HTTP trust boundaries: the public-facing `configread` slice (GET + list under /api/v1, admin-gated) and the internal control-plane `configreadinternal` slice (GET under /internal/v1, caller-cell gated).
configcore/internal/crypto
Package crypto provides configcore-specific crypto helpers.
Package crypto provides configcore-specific crypto helpers.
configcore/internal/domain
Package domain contains the configcore Cell domain models.
Package domain contains the configcore Cell domain models.
configcore/internal/dto
Package dto provides shared handler-level data transfer objects for configcore.
Package dto provides shared handler-level data transfer objects for configcore.
configcore/internal/events
Package events defines configcore's internal event wire payloads and decoders.
Package events defines configcore's internal event wire payloads and decoders.
configcore/internal/mem
Package mem provides in-memory repository implementations for configcore.
Package mem provides in-memory repository implementations for configcore.
configcore/internal/ports
Package ports defines the driven-side interfaces for configcore.
Package ports defines the driven-side interfaces for configcore.
configcore/internal/scopedread
Package scopedread funnels every tenant-scoped configcore read through a single tenant.WithScope + RunInTx wrapper.
Package scopedread funnels every tenant-scoped configcore read through a single tenant.WithScope + RunInTx wrapper.
configcore/internal/testutil
Package testutil provides test doubles and helpers scoped to the configcore cell.
Package testutil provides test doubles and helpers scoped to the configcore cell.
configcore/postgres
Package postgres wires PostgreSQL-backed repositories for configcore.
Package postgres wires PostgreSQL-backed repositories for configcore.
configcore/slices/configpublish
Package configpublish — PublishFailureMode type.
Package configpublish — PublishFailureMode type.
configcore/slices/configread
Package configread implements the public config-read slice: GET + list of config entries under /api/v1/config (admin-gated).
Package configread implements the public config-read slice: GET + list of config entries under /api/v1/config (admin-gated).
configcore/slices/configreadinternal
Package configreadinternal implements the internal control-plane config-read slice: GET a config entry under /internal/v1/config, mounted on the InternalListener where service-token + caller-cell auth is enforced.
Package configreadinternal implements the internal control-plane config-read slice: GET a config entry under /internal/v1/config, mounted on the InternalListener where service-token + caller-cell auth is enforced.
configcore/slices/configsubscribe
Package configsubscribe implements the config-subscribe slice: consumes config state-sync events to update a local version-tracking cache.
Package configsubscribe implements the config-subscribe slice: consumes config state-sync events to update a local version-tracking cache.
configcore/slices/configwrite
Package configwrite implements the config-write slice: Create/Update/Delete config entries with event publishing.
Package configwrite implements the config-write slice: Create/Update/Delete config entries with event publishing.
configcore/slices/featureflag
Package featureflag implements the feature-flag slice: Get/Evaluate feature flags.
Package featureflag implements the feature-flag slice: Get/Evaluate feature flags.
configcore/slices/flagwrite
Package flagwrite implements the flag-write slice: Create/Update/Delete/Toggle feature flags with transactional repo writes (L1 consistency).
Package flagwrite implements the flag-write slice: Create/Update/Delete/Toggle feature flags with transactional repo writes (L1 consistency).
cmd
corebundle command
controlplane.go: 内部控制平面端点 HMAC 密钥环构造(/internal/v1/* service token)。
controlplane.go: 内部控制平面端点 HMAC 密钥环构造(/internal/v1/* service token)。
internal/wiresummary
Package wiresummary provides the shared BuildCellWireSummaries helper used by both the HTTP catalog (cmd/corebundle) and the CLI export (cmd/gocell/app).
Package wiresummary provides the shared BuildCellWireSummaries helper used by both the HTTP catalog (cmd/corebundle) and the CLI export (cmd/gocell/app).
gocell module
corecells module
generated
kernel
assembly
Package assembly provides the CoreAssembly that orchestrates Cell lifecycle (register, start, stop, health).
Package assembly provides the CoreAssembly that orchestrates Cell lifecycle (register, start, stop, health).
auth
Package auth holds the kernel-level authentication plan model: the sealed AuthPlan / ListenerAuth interfaces, their five typed implementations (None, JWT, JWTFromAssembly, MTLS, ServiceToken), and the narrow dependency interfaces (IntentTokenVerifier, NonceStore, HMACKeyring, AuthProvider, ...) that runtime/auth concrete types satisfy structurally.
Package auth holds the kernel-level authentication plan model: the sealed AuthPlan / ListenerAuth interfaces, their five typed implementations (None, JWT, JWTFromAssembly, MTLS, ServiceToken), and the narrow dependency interfaces (IntentTokenVerifier, NonceStore, HMACKeyring, AuthProvider, ...) that runtime/auth concrete types satisfy structurally.
auth/authtest
Package authtest provides composition-root convenience helpers for AuthPlan constructors.
Package authtest provides composition-root convenience helpers for AuthPlan constructors.
cell
Package cell defines the core Cell and Slice abstractions for the GoCell framework: interfaces (CellIdentity / CellLifecycle / CellStatus / CellInventory composed into Cell), the BaseCell implementation, and the Registrar surface a Cell uses to declare routes / subscriptions / health probes / lifecycle hooks / config-reload callbacks.
Package cell defines the core Cell and Slice abstractions for the GoCell framework: interfaces (CellIdentity / CellLifecycle / CellStatus / CellInventory composed into Cell), the BaseCell implementation, and the Registrar surface a Cell uses to declare routes / subscriptions / health probes / lifecycle hooks / config-reload callbacks.
cell/celltest
Package celltest provides test utilities for kernel/cell types.
Package celltest provides test utilities for kernel/cell types.
cellvocab
Package cellvocab is the single source of truth for the GoCell metadata vocabulary — the typed enums (CellType, ContractKind, ContractRole, CellLifecycle, ContractLifecycle, Level), their parsers/predicates, and the canonical consistency level ordering.
Package cellvocab is the single source of truth for the GoCell metadata vocabulary — the typed enums (CellType, ContractKind, ContractRole, CellLifecycle, ContractLifecycle, Level), their parsers/predicates, and the canonical consistency level ordering.
clock
Package clock is GoCell's platform-level Clock abstraction.
Package clock is GoCell's platform-level Clock abstraction.
clock/clockmock
Package clockmock provides a deterministic clock.Clock implementation driven by explicit FakeClock.Advance and FakeClock.Set calls.
Package clockmock provides a deterministic clock.Clock implementation driven by explicit FakeClock.Advance and FakeClock.Set calls.
command
Package command provides L4 (DeviceLatent) command queue primitives for unicast device commands with durable ack semantics.
Package command provides L4 (DeviceLatent) command queue primitives for unicast device commands with durable ack semantics.
command/commandtest
Package commandtest provides shared conformance assertions for command.Queue + command.ActiveScanner implementations.
Package commandtest provides shared conformance assertions for command.Queue + command.ActiveScanner implementations.
contractspec
Package contractspec defines the runtime descriptor type for one contract endpoint, shared by the layers that bind contracts to wire protocols.
Package contractspec defines the runtime descriptor type for one contract endpoint, shared by the layers that bind contracts to wire protocols.
crypto
Package crypto defines the kernel-level cryptographic interfaces: KeyProvider, KeyHandle, ValueTransformer, and CurrentKeyIDProvider.
Package crypto defines the kernel-level cryptographic interfaces: KeyProvider, KeyHandle, ValueTransformer, and CurrentKeyIDProvider.
ctxkeys
Package ctxkeys provides typed context keys for Cell-model identifiers (cell, slice, journey, contract) propagated through context.Context.
Package ctxkeys provides typed context keys for Cell-model identifiers (cell, slice, journey, contract) propagated through context.Context.
depgraph
Package depgraph defines the core data model for the GoCell package-level dependency graph: Graph, Node, Stats, and the layer/cell/slice classifiers.
Package depgraph defines the core data model for the GoCell package-level dependency graph: Graph, Node, Stats, and the layer/cell/slice classifiers.
fsm
Package fsm provides generic helpers for map-based finite-state-machine transition tables used by kernel state machines.
Package fsm provides generic helpers for map-based finite-state-machine transition tables used by kernel state machines.
governance
Package governance implements validation rules for GoCell metadata.
Package governance implements validation rules for GoCell metadata.
healthz
Package healthz defines the kernel-level interface for readiness probes.
Package healthz defines the kernel-level interface for readiness probes.
idempotency
Package idempotency defines the consumer-side idempotency interface (Claimer with two-phase Claim / Commit / Release semantics) used by kernel/outbox.ConsumerBase to deduplicate event delivery.
Package idempotency defines the consumer-side idempotency interface (Claimer with two-phase Claim / Commit / Release semantics) used by kernel/outbox.ConsumerBase to deduplicate event delivery.
journey
Package journey provides query access to Journey metadata and status.
Package journey provides query access to Journey metadata and status.
lifecycle
Package lifecycle provides the ContextCloser interface and adapters for managing resource teardown with context-aware shutdown budgets.
Package lifecycle provides the ContextCloser interface and adapters for managing resource teardown with context-aware shutdown budgets.
metadata
Package metadata implements structural derivation for AssemblyMeta and related types.
Package metadata implements structural derivation for AssemblyMeta and related types.
metadata/metadatatest
Package metadatatest provides typed builders for constructing kernel/metadata fixtures in *_test.go files.
Package metadatatest provides typed builders for constructing kernel/metadata fixtures in *_test.go files.
metautil
Package metautil holds shared metadata limits and validation primitives used by kernel-level transports (kernel/outbox, kernel/command).
Package metautil holds shared metadata limits and validation primitives used by kernel-level transports (kernel/outbox, kernel/command).
observability
Package observability is the namespace root for GoCell's provider-neutral metrics and pool-stats abstractions.
Package observability is the namespace root for GoCell's provider-neutral metrics and pool-stats abstractions.
observability/correlation
Package correlation provides a sealed read-model carrying the three cross-cutting observability IDs (trace, request, correlation) for use in issue #1048 (trace → audit reverse lookup).
Package correlation provides a sealed read-model carrying the three cross-cutting observability IDs (trace, request, correlation) for use in issue #1048 (trace → audit reverse lookup).
observability/metrics
Package metrics defines a provider-neutral metrics abstraction used by kernel modules that emit counters and histograms without importing any specific backend (Prometheus, OTel, …).
Package metrics defines a provider-neutral metrics abstraction used by kernel modules that emit counters and histograms without importing any specific backend (Prometheus, OTel, …).
observability/metrics/metricstest
Package metricstest provides the cross-implementation conformance harness for the kernel metrics no-skip-on-cancel contract.
Package metricstest provides the cross-implementation conformance harness for the kernel metrics no-skip-on-cancel contract.
observability/poolstats
Package poolstats defines a provider-neutral connection-pool snapshot interface.
Package poolstats defines a provider-neutral connection-pool snapshot interface.
outbox
Package outbox defines interfaces for the transactional outbox pattern: Writer (insert within a transaction), Emitter (write-or-direct abstraction), Relay (poll-and-publish), Publisher (fire-and-forget), and Subscriber (consume).
Package outbox defines interfaces for the transactional outbox pattern: Writer (insert within a transaction), Emitter (write-or-direct abstraction), Relay (poll-and-publish), Publisher (fire-and-forget), and Subscriber (consume).
outbox/outboxtest
Package outboxtest provides a reusable conformance test suite for outbox.Publisher and outbox.Subscriber implementations.
Package outboxtest provides a reusable conformance test suite for outbox.Publisher and outbox.Subscriber implementations.
persistence
Package persistence defines shared persistence abstractions for the GoCell framework.
Package persistence defines shared persistence abstractions for the GoCell framework.
persistence/persistencetest
Package persistencetest provides conformance suites for persistence.TxRunner implementations.
Package persistencetest provides conformance suites for persistence.TxRunner implementations.
projection
Package projection declares the kernel-level contracts for the CQRS projection lifecycle harness: the business event→state Apply hook, the CheckpointStore offset abstraction, the MemCursor / MemReplaySource demo helpers, the functional Option seam, and the rebuild-lifecycle Phase enum.
Package projection declares the kernel-level contracts for the CQRS projection lifecycle harness: the business event→state Apply hook, the CheckpointStore offset abstraction, the MemCursor / MemReplaySource demo helpers, the functional Option seam, and the rebuild-lifecycle Phase enum.
projection/projectiontest
Package projectiontest provides conformance test helpers for projection.CheckpointStore, projection.ReplaySource, and projection.Cursor implementations.
Package projectiontest provides conformance test helpers for projection.CheckpointStore, projection.ReplaySource, and projection.Cursor implementations.
reconcile
Package reconcile is GoCell's L4 desired-state convergence harness, a level-triggered control loop modeled on Kubernetes controller-runtime's Reconciler.
Package reconcile is GoCell's L4 desired-state convergence harness, a level-triggered control loop modeled on Kubernetes controller-runtime's Reconciler.
reconcile/reconciletest
Package reconciletest provides public test-support fakes and conformance suites for kernel/reconcile consumers and LeaderElector adapters.
Package reconciletest provides public test-support fakes and conformance suites for kernel/reconcile consumers and LeaderElector adapters.
registry
Package registry provides indexed, read-only access to parsed GoCell project metadata (cells, slices, contracts).
Package registry provides indexed, read-only access to parsed GoCell project metadata (cells, slices, contracts).
saga
Package saga provides the L3 (WorkflowEventual) saga orchestration state machine: the Status lifecycle, the Instance record, and the pure transition functions (AdvanceSaga, AdvanceStep, Transition) that advance an instance.
Package saga provides the L3 (WorkflowEventual) saga orchestration state machine: the Status lifecycle, the Instance record, and the pure transition functions (AdvanceSaga, AdvanceStep, Transition) that advance an instance.
saga/journal
Package journal provides the durable, append-only Journal for L3 (WorkflowEventual) saga orchestration: the interface the runtime Coordinator (PR-03) and the PostgreSQL store (PR-04) build on, plus an in-memory implementation (MemJournal) for tests and development.
Package journal provides the durable, append-only Journal for L3 (WorkflowEventual) saga orchestration: the interface the runtime Coordinator (PR-03) and the PostgreSQL store (PR-04) build on, plus an in-memory implementation (MemJournal) for tests and development.
saga/sagajournaltest
Package sagajournaltest provides a reusable conformance suite for implementations of journal.Journal.
Package sagajournaltest provides a reusable conformance suite for implementations of journal.Journal.
saga/sagaprojection
Package sagaprojection bridges kernel/saga/journal.GlobalReader to the projection harness (projection.ReplaySource + projection.Cursor + cellvocab.ProjectionEvent).
Package sagaprojection bridges kernel/saga/journal.GlobalReader to the projection harness (projection.ReplaySource + projection.Cursor + cellvocab.ProjectionEvent).
saga/sagaregtest
Package sagaregtest provides a reusable conformance suite for implementations of saga.Resolver.
Package sagaregtest provides a reusable conformance suite for implementations of saga.Resolver.
verify
Package verify provides verify-command introspection used by `gocell verify` and by kernel/governance VERIFY-* rules.
Package verify provides verify-command introspection used by `gocell verify` and by kernel/governance VERIFY-* rules.
webhook
Package webhook is the kernel-level pure-computation core for GoCell's bidirectional webhook capability (KERNEL-WEBHOOK-01): inbound receiver verification and outbound dispatcher signing.
Package webhook is the kernel-level pure-computation core for GoCell's bidirectional webhook capability (KERNEL-WEBHOOK-01): inbound receiver verification and outbound dispatcher signing.
webhook/webhooktest
Package webhooktest provides a sign↔verify conformance suite for webhook.Signer and webhook.Verifier implementations.
Package webhooktest provides a sign↔verify conformance suite for webhook.Signer and webhook.Verifier implementations.
worker
Package worker defines the Worker domain contract.
Package worker defines the Worker domain contract.
wrapper
Package wrapper binds contracts to runtime observability primitives.
Package wrapper binds contracts to runtime observability primitives.
pkg
aeadutil
Package aeadutil provides pure AES-GCM helpers shared across runtime/crypto and adapters/vault.
Package aeadutil provides pure AES-GCM helpers shared across runtime/crypto and adapters/vault.
authz
Package authz is the framework-level **authorization decision vocabulary** (the PDP contract) returned by auth.Authorizer.
Package authz is the framework-level **authorization decision vocabulary** (the PDP contract) returned by auth.Authorizer.
cmdrun
Package cmdrun centralizes whitelisted subprocess invocation for governance and verify helpers (gocell validate / gocell check / golangci-lint runner / archtest tooling).
Package cmdrun centralizes whitelisted subprocess invocation for governance and verify helpers (gocell validate / gocell check / golangci-lint runner / archtest tooling).
contractpath
Package contractpath provides the single source of truth for converting a contract ID to its module-relative generated package path.
Package contractpath provides the single source of truth for converting a contract ID to its module-relative generated package path.
csvparam
Package csvparam parses comma-separated flag and query parameter values.
Package csvparam parses comma-separated flag and query parameter values.
ctxcancel
Package ctxcancel provides shared helpers for translating context cancellation surfaced from IO operations (DB scan, RPC call, message bus claim) into structured *errcode.Error values with the correct HTTP status for each ctx error variant:
Package ctxcancel provides shared helpers for translating context cancellation surfaced from IO operations (DB scan, RPC call, message bus claim) into structured *errcode.Error values with the correct HTTP status for each ctx error variant:
ctxkeys
Package ctxkeys provides typed context keys for generic observability and networking identifiers (correlation, trace, span, request, real IP) propagated through context.Context.
Package ctxkeys provides typed context keys for generic observability and networking identifiers (correlation, trace, span, request, real IP) propagated through context.Context.
ctxutil
Package ctxutil provides small context.Context helpers for crossing cancellation boundaries that the standard library does not directly model.
Package ctxutil provides small context.Context helpers for crossing cancellation boundaries that the standard library does not directly model.
errcode
Package errcode provides structured error codes for the GoCell framework.
Package errcode provides structured error codes for the GoCell framework.
errcode/errcodetest
Package errcodetest provides typed assertion funnels for errcode-bearing test paths.
Package errcodetest provides typed assertion funnels for errcode-bearing test paths.
httputil
Package httputil provides shared HTTP response helpers for GoCell handlers, including JSON success/error writers and the standard response envelope.
Package httputil provides shared HTTP response helpers for GoCell handlers, including JSON success/error writers and the standard response envelope.
idutil
Package idutil provides shared ID validation and generation for observability-safe identifiers across kernel/ and runtime/ layers.
Package idutil provides shared ID validation and generation for observability-safe identifiers across kernel/ and runtime/ layers.
logutil
Package logutil provides shared helpers for safely emitting user-controlled or network-derived strings through structured logging (slog).
Package logutil provides shared helpers for safely emitting user-controlled or network-derived strings through structured logging (slog).
migration
Package migration holds the layer-free database-migration value types shared across all GoCell layers.
Package migration holds the layer-free database-migration value types shared across all GoCell layers.
observability
Package observability holds tiny shared helpers used across kernel/, runtime/ and adapters/ for emitting structured signals safely.
Package observability holds tiny shared helpers used across kernel/, runtime/ and adapters/ for emitting structured signals safely.
panicregister
Package panicregister provides the only approved way to panic in GoCell production code.
Package panicregister provides the only approved way to panic in GoCell production code.
pathsafe
Package pathsafe is the single funnel for scaffold/codegen file writes.
Package pathsafe is the single funnel for scaffold/codegen file writes.
pgquery
Package pgquery provides PostgreSQL helpers: SQL query building (Builder) and generic PG SQLSTATE wire-error classification (IsUniqueViolation / IsForeignKeyViolation).
Package pgquery provides PostgreSQL helpers: SQL query building (Builder) and generic PG SQLSTATE wire-error classification (IsUniqueViolation / IsForeignKeyViolation).
pgrepoapproved
Package pgrepoapproved provides the proof-of-authorization token that pgexec.ExecDirect requires as its first argument.
Package pgrepoapproved provides the proof-of-authorization token that pgexec.ExecDirect requires as its first argument.
redaction
Package redaction provides fail-closed scrubbing of sensitive substrings in error messages and free-form strings before they reach observability backends (OTel span attributes, audit logs, last_error storage columns).
Package redaction provides fail-closed scrubbing of sensitive substrings in error messages and free-form strings before they reach observability backends (OTel span attributes, audit logs, last_error storage columns).
scaffoldid
Package scaffoldid is the single source of truth for typed scaffold identifier validation across the project.
Package scaffoldid is the single source of truth for typed scaffold identifier validation across the project.
securecookie
Package securecookie encodes and decodes cookie values with HMAC-SHA256 signing and optional AES-GCM encryption using Go standard library crypto only.
Package securecookie encodes and decodes cookie values with HMAC-SHA256 signing and optional AES-GCM encryption using Go standard library crypto only.
secutil
Package secutil provides security utility helpers shared across GoCell adapters.
Package secutil provides security utility helpers shared across GoCell adapters.
tenant
Package tenant holds the layer-free tenancy value types shared across all GoCell layers: the TenantID sealed newtype (the multi-tenant isolation boundary identifier) and the RowScope authorization obligation enum.
Package tenant holds the layer-free tenancy value types shared across all GoCell layers: the TenantID sealed newtype (the multi-tenant isolation boundary identifier) and the RowScope authorization obligation enum.
testutil/errutil
Package errutil provides test-only helpers for inspecting joined error trees.
Package errutil provides test-only helpers for inspecting joined error trees.
testutil/fileutil
Package fileutil exports file I/O helpers for GoCell tests.
Package fileutil exports file I/O helpers for GoCell tests.
testutil/sloghelper
Package sloghelper provides test helpers for asserting slog JSON output.
Package sloghelper provides test helpers for asserting slog JSON output.
testutil/testtime
Package testtime exports the canonical timeout / poll-interval constants used across GoCell test code.
Package testtime exports the canonical timeout / poll-interval constants used across GoCell test code.
testutil/testwait
Package testwait provides typed test-wait markers that replace bare require.Eventually / assert.Eventually polling.
Package testwait provides typed test-wait markers that replace bare require.Eventually / assert.Eventually polling.
validation
Package validation provides field-level input validation helpers that return structured errcode errors suitable for HTTP handlers and service- layer preconditions.
Package validation provides field-level input validation helpers that return structured errcode errors suitable for HTTP handlers and service- layer preconditions.
yamlsafe
Package yamlsafe provides a typed YAML scalar that safely round-trips through plain-style YAML emission.
Package yamlsafe provides a typed YAML scalar that safely round-trips through plain-style YAML emission.
runtime
audit
Package audit centralizes bootstrap-period audit-chain helpers used by auditcore's auditappendbootstrap slice handler.
Package audit centralizes bootstrap-period audit-chain helpers used by auditcore's auditappendbootstrap slice handler.
audit/ledger
Package ledger provides a typed Protocol primitive and Store interface for append-only, HMAC-linked audit chains.
Package ledger provides a typed Protocol primitive and Store interface for append-only, HMAC-linked audit chains.
audit/ledger/storetest
Package storetest provides a reusable Protocol-driven contract test suite for ledger.Store implementations.
Package storetest provides a reusable Protocol-driven contract test suite for ledger.Store implementations.
auth
ref: go-kratos/kratos middleware/auth/auth.go — auth middleware pattern Adopted: middleware wrapping pattern, Claims extraction from context.
ref: go-kratos/kratos middleware/auth/auth.go — auth middleware pattern Adopted: middleware wrapping pattern, Claims extraction from context.
auth/config
Package config is the production wiring entrypoint for runtime/auth components.
Package config is the production wiring entrypoint for runtime/auth components.
auth/credentialfence
Package credentialfence is the sealed source of the credential-invalidation FenceToken — a capability proof that authorizes calls to the three credential mutation methods (session.Store.RevokeForSubject / refresh.Store.RevokeUser / ports.UserRepository.BumpAuthzEpoch).
Package credentialfence is the sealed source of the credential-invalidation FenceToken — a capability proof that authorizes calls to the three credential mutation methods (session.Store.RevokeForSubject / refresh.Store.RevokeUser / ports.UserRepository.BumpAuthzEpoch).
auth/keystest
Package keystest provides RSA / HMAC key fixtures for tests that exercise the auth subsystem (JWT issue/verify, HMAC service-token rings, OIDC stubs).
Package keystest provides RSA / HMAC key fixtures for tests that exercise the auth subsystem (JWT issue/verify, HMAC service-token rings, OIDC stubs).
auth/refresh
This file declares the two public error sentinels for refresh.Store.
This file declares the two public error sentinels for refresh.Store.
auth/refresh/memstore
Package memstore provides an in-memory implementation of refresh.Store.
Package memstore provides an in-memory implementation of refresh.Store.
auth/refresh/storetest
Package storetest provides a reusable contract test suite for refresh.Store implementations.
Package storetest provides a reusable contract test suite for refresh.Store implementations.
auth/session
Package session declares the typed-Go-heavy Protocol primitive that bundles session-related protocol decisions for accesscore (and any future cell that owns server-side session state).
Package session declares the typed-Go-heavy Protocol primitive that bundles session-related protocol decisions for accesscore (and any future cell that owns server-side session state).
auth/session/sessiontest
Package sessiontest provides test helpers for code that depends on runtime/auth/session.
Package sessiontest provides test helpers for code that depends on runtime/auth/session.
auth/session/storetest
Package storetest provides a reusable Protocol-driven contract test suite for session.Store implementations.
Package storetest provides a reusable Protocol-driven contract test suite for session.Store implementations.
bootstrap
Package bootstrap orchestrates the full GoCell application lifecycle: config loading, assembly init/start, HTTP serving, event subscriptions, background workers, and graceful shutdown.
Package bootstrap orchestrates the full GoCell application lifecycle: config loading, assembly init/start, HTTP serving, event subscriptions, background workers, and graceful shutdown.
capability
Package capability defines GoCell capability providers: assembly-level shared infrastructure resources (postgres pool, redis client, ...) provisioned once by the composition root and injected into every consuming cell module.
Package capability defines GoCell capability providers: assembly-level shared infrastructure resources (postgres pool, redis client, ...) provisioned once by the composition root and injected into every consuming cell module.
command
Package command wires kernel command workers (queue discovery + dispatch registry) into the runtime.
Package command wires kernel command workers (queue discovery + dispatch registry) into the runtime.
composition
Package composition provides the public Composition Root abstraction for GoCell assemblies.
Package composition provides the public Composition Root abstraction for GoCell assemblies.
config
Package config provides a Config interface with YAML + environment variable loading.
Package config provides a Config interface with YAML + environment variable loading.
crypto
Package crypto provides the KeyProvider abstraction and implementations for encrypting sensitive values at the repository boundary.
Package crypto provides the KeyProvider abstraction and implementations for encrypting sensitive values at the repository boundary.
devtools/catalog
Package catalog — build.go: BuildDocument and all entity/filter helpers.
Package catalog — build.go: BuildDocument and all entity/filter helpers.
distlock
Package distlock defines the provider-neutral distributed-lock contract for the GoCell runtime layer.
Package distlock defines the provider-neutral distributed-lock contract for the GoCell runtime layer.
distlock/locktest
Package locktest provides a controllable in-memory Driver implementation and a conformance test suite for use in unit tests.
Package locktest provides a controllable in-memory Driver implementation and a conformance test suite for use in unit tests.
eventbus
Package eventbus provides an in-memory implementation of kernel/outbox Publisher and Subscriber for development and testing.
Package eventbus provides an in-memory implementation of kernel/outbox Publisher and Subscriber for development and testing.
eventrouter
Package eventrouter provides a Router that separates event subscription declaration from execution.
Package eventrouter provides a Router that separates event subscription declaration from execution.
grpc/interceptor
Package interceptor provides the gRPC unary server interceptor chain that aligns the gRPC transport with the existing HTTP middleware stack (runtime/http/middleware): RequestID, Tracing, Metrics, Auth, and Recovery.
Package interceptor provides the gRPC unary server interceptor chain that aligns the gRPC transport with the existing HTTP middleware stack (runtime/http/middleware): RequestID, Tracing, Metrics, Auth, and Recovery.
http/cellmw
Package cellmw provides reusable RouteHandler wrappers for use in cell slice handlers.
Package cellmw provides reusable RouteHandler wrappers for use in cell slice handlers.
http/devtools
Package devtools provides framework-internal HTTP routes that expose project catalog metadata (cells, slices, contracts, journeys, assemblies, actors) plus optional cell-level and package-level dependency graphs to admin-authenticated clients.
Package devtools provides framework-internal HTTP routes that expose project catalog metadata (cells, slices, contracts, journeys, assemblies, actors) plus optional cell-level and package-level dependency graphs to admin-authenticated clients.
http/health
Package health provides /healthz (liveness) and /readyz (readiness) HTTP endpoints.
Package health provides /healthz (liveness) and /readyz (readiness) HTTP endpoints.
http/health/healthtest
Package healthtest provides shared test helpers for packages that need to assert on the slog channel-d verbose breakdown emitted by runtime/http/health.Handler.
Package healthtest provides shared test helpers for packages that need to assert on the slog channel-d verbose breakdown emitted by runtime/http/health.Handler.
http/health/probequery
Package probequery parses query parameters that gate health-probe verbose output.
Package probequery parses query parameters that gate health-probe verbose output.
http/healthtest
Package healthtest provides test-only helpers for probe authors writing against the runtime/http/health API.
Package healthtest provides test-only helpers for probe authors writing against the runtime/http/health API.
http/idempotency
Package idempotency provides HTTP-layer idempotency primitives for GoCell.
Package idempotency provides HTTP-layer idempotency primitives for GoCell.
http/idempotency/idempotencytest
Package idempotencytest provides a reusable conformance suite for implementations of idemhttp.Store.
Package idempotencytest provides a reusable conformance suite for implementations of idemhttp.Store.
http/middleware
Package middleware provides chi-compatible HTTP middleware for GoCell applications.
Package middleware provides chi-compatible HTTP middleware for GoCell applications.
http/router
Package router provides a chi-based HTTP router that implements kernel/cell.RouteMux with default middleware and automatic health/metrics endpoint registration.
Package router provides a chi-based HTTP router that implements kernel/cell.RouteMux with default middleware and automatic health/metrics endpoint registration.
http/schemavalidate
Package schemavalidate provides JSON Schema validation for generated HTTP handlers.
Package schemavalidate provides JSON Schema validation for generated HTTP handlers.
http/tlsutil
Package tlsutil builds server-side TLS configurations for GoCell HTTP listeners.
Package tlsutil builds server-side TLS configurations for GoCell HTTP listeners.
internal/authtest
Package authtest provides test-only auth Policy helpers for runtime middleware behavior tests.
Package authtest provides test-only auth Policy helpers for runtime middleware behavior tests.
internal/contractbuild
Package contractbuild is the sole sanctioned runtime-side construction funnel for framework-owned kernel/contractspec.ContractSpec values.
Package contractbuild is the sole sanctioned runtime-side construction funnel for framework-owned kernel/contractspec.ContractSpec values.
lifecycle
Package lifecycle provides a runtime read-surface over the maturity lifecycle (kernel/cellvocab.CellLifecycle) of the cells composing a running assembly.
Package lifecycle provides a runtime read-surface over the maturity lifecycle (kernel/cellvocab.CellLifecycle) of the cells composing a running assembly.
observability/healthz
Package healthz provides the default in-memory kernel/healthz.Aggregator implementation for GoCell.
Package healthz provides the default in-memory kernel/healthz.Aggregator implementation for GoCell.
observability/healthz/healthztest
Package healthztest provides shared test helpers for kernel/healthz.Aggregator implementations.
Package healthztest provides shared test helpers for kernel/healthz.Aggregator implementations.
observability/logging
Package logging provides a slog.Handler that enriches log records with trace_id, span_id, request_id, correlation_id, and cell_id from the request context.
Package logging provides a slog.Handler that enriches log records with trace_id, span_id, request_id, correlation_id, and cell_id from the request context.
observability/metrics
Package metrics provides HTTP request instrumentation interfaces and an in-memory implementation.
Package metrics provides HTTP request instrumentation interfaces and an in-memory implementation.
observability/metrics/metricstest
Package metricstest provides a shared conformance suite for implementations of metrics.Collector.
Package metricstest provides a shared conformance suite for implementations of metrics.Collector.
observability/tracingtest
Package tracingtest provides an in-process, stdlib-only Tracer fixture for tests.
Package tracingtest provides an in-process, stdlib-only Tracer fixture for tests.
outbox
Package outbox provides the runtime-layer Store interface and relay worker for transactional outbox delivery.
Package outbox provides the runtime-layer Store interface and relay worker for transactional outbox delivery.
outbox/outboxtest
Package outboxtest provides a public in-memory Store implementation and a Store conformance test suite for use in unit tests.
Package outboxtest provides a public in-memory Store implementation and a Store conformance test suite for use in unit tests.
saga
Package saga (see doc.go for the package narrative) is the runtime engine that drives saga instances forward.
Package saga (see doc.go for the package narrative) is the runtime engine that drives saga instances forward.
saga/executor
Package executor provides the step-level execution engine for saga instances.
Package executor provides the step-level execution engine for saga instances.
saga/internal/sagalog
Package sagalog centralizes the per-instance saga log attribute set.
Package sagalog centralizes the per-instance saga log attribute set.
shutdown
Package shutdown provides graceful shutdown support by listening for SIGINT/SIGTERM signals with a configurable timeout and ordered teardown.
Package shutdown provides graceful shutdown support by listening for SIGINT/SIGTERM signals with a configurable timeout and ordered teardown.
state/cas
Package cas provides a typed-Go-heavy Protocol primitive for compare-and-swap (CAS) optimistic concurrency control.
Package cas provides a typed-Go-heavy Protocol primitive for compare-and-swap (CAS) optimistic concurrency control.
webhook
Package webhook implements the inbound-webhook receiver runtime for GoCell.
Package webhook implements the inbound-webhook receiver runtime for GoCell.
webhook/dispatch
Package dispatch wires outbound-webhook dispatchers into the event router.
Package dispatch wires outbound-webhook dispatchers into the event router.
websocket
Package websocket provides a Hub-based WebSocket connection manager with signal-first broadcasting, ping/pong health checks, and graceful shutdown.
Package websocket provides a Hub-based WebSocket connection manager with signal-first broadcasting, ping/pong health checks, and graceful shutdown.
worker
Package worker provides a Worker interface and WorkerGroup for managing concurrent background workers with graceful lifecycle control.
Package worker provides a Worker interface and WorkerGroup for managing concurrent background workers with graceful lifecycle control.
tests
contracttest
Package contracttest provides schema-driven contract validation helpers for use in contract_test.go files across GoCell cells.
Package contracttest provides schema-driven contract validation helpers for use in contract_test.go files across GoCell cells.
contracttest/internal/fixtureload
Package fixtureload encapsulates contract schema/fixture file reads.
Package fixtureload encapsulates contract schema/fixture file reads.
e2e/encryption
Package encryption holds the e2e capability tests for the configcore PG pilot's value-encryption pipeline.
Package encryption holds the e2e capability tests for the configcore PG pilot's value-encryption pipeline.
e2e/internal/require
Package require provides conditional-skip helpers for e2e tests.
Package require provides conditional-skip helpers for e2e tests.
testutil
Package testutil provides shared test utilities for integration tests.
Package testutil provides shared test utilities for integration tests.
tools module
archtest
Importable rule body for ADAPTER-RETURNS-DECLARED-TYPES-01.
Importable rule body for ADAPTER-RETURNS-DECLARED-TYPES-01.
archtest/internal/bcryptcostredfixture
Package bcryptcostredfixture is a known-positive for BCRYPT-COST-FUNNEL-01 rule A1: it deliberately calls bcrypt.GenerateFromPassword outside cells/accesscore/internal/credential/hasher.go.
Package bcryptcostredfixture is a known-positive for BCRYPT-COST-FUNNEL-01 rule A1: it deliberately calls bcrypt.GenerateFromPassword outside cells/accesscore/internal/credential/hasher.go.
archtest/internal/callresolver
Package callresolver is an archtest-internal convenience layer over internal/typeseval + internal/scanner for the recurring "walk every FuncDecl body, resolve a callee, assert a receiver" shape that several rules (audit_hash_input_frozen, serviceowned_handler_owner_check, changepassword_inactive_gate, …) previously hand-wrote and copy-drifted.
Package callresolver is an archtest-internal convenience layer over internal/typeseval + internal/scanner for the recurring "walk every FuncDecl body, resolve a callee, assert a receiver" shape that several rules (audit_hash_input_frozen, serviceowned_handler_owner_check, changepassword_inactive_gate, …) previously hand-wrote and copy-drifted.
archtest/internal/scanner
Package scanner provides shared walk + parse + report primitives for tools/archtest scanners.
Package scanner provides shared walk + parse + report primitives for tools/archtest scanners.
archtest/internal/taggrouploopfixtures
Package taggrouploopfixtures holds typed-loadable .go fixtures for TAGGROUP-LOOP-FORBIDS-TYPED-RUN-01 (and its red/green reverse self-tests).
Package taggrouploopfixtures holds typed-loadable .go fixtures for TAGGROUP-LOOP-FORBIDS-TYPED-RUN-01 (and its red/green reverse self-tests).
archtest/internal/typeseval
Package typeseval provides go/types-backed helpers for archtest scanners.
Package typeseval provides go/types-backed helpers for archtest scanners.
archtest/internal/usage02fixtures
Package usage02fixtures holds typed-loadable .go fixtures for SCANNER-FRAMEWORK-USAGE-02 (main detector + BS1/BS2/BS3 reverse self-tests + BS4/BS5 main-detector-handled forms, on both EachInChildren and EachInSubtree depth axes).
Package usage02fixtures holds typed-loadable .go fixtures for SCANNER-FRAMEWORK-USAGE-02 (main detector + BS1/BS2/BS3 reverse self-tests + BS4/BS5 main-detector-handled forms, on both EachInChildren and EachInSubtree depth axes).
codegen
Package codegen provides the shared rendering, writing, and verification pipeline for GoCell code generators.
Package codegen provides the shared rendering, writing, and verification pipeline for GoCell code generators.
codegen/cellgen
Package cellgen renders cell_gen.go and slice_gen.go from cell.yaml / slice.yaml metadata.
Package cellgen renders cell_gen.go and slice_gen.go from cell.yaml / slice.yaml metadata.
codegen/contractgen
Package contractgen renders typed Go scaffolding from a single contract.yaml + its referenced JSON schemas.
Package contractgen renders typed Go scaffolding from a single contract.yaml + its referenced JSON schemas.
codegen/markergen
Package markergen scans cell.go marker comments (// +cell:listener, // +slice:route) and projects them into a per-cell WireBundle that drives cellgen wire generation.
Package markergen scans cell.go marker comments (// +cell:listener, // +slice:route) and projects them into a per-cell WireBundle that drives cellgen wire generation.
codegen/requireddepsgen
Package requireddepsgen generates validateRequired() methods for Service structs by reading gocell:"required" struct field tags.
Package requireddepsgen generates validateRequired() methods for Service structs by reading gocell:"required" struct field tags.
codegen/sagacoveragegen
Package sagacoveragegen renders the saga fanout artifacts derived from the saga.Status / journal.EventKind const sets — the single source of truth for SAGA-STATUS-FANOUT-COVERAGE-01.
Package sagacoveragegen renders the saga fanout artifacts derived from the saga.Status / journal.EventKind const sets — the single source of truth for SAGA-STATUS-FANOUT-COVERAGE-01.
codegen/sharedschema
Package sharedschema derives byte-identical mirror copies of the shared error envelope schema from its single canonical source.
Package sharedschema derives byte-identical mirror copies of the shared error envelope schema from its single canonical source.
depgraph
Package depgraph provides the golang.org/x/tools/go/packages integration for building a GoCell dependency graph from live module source.
Package depgraph provides the golang.org/x/tools/go/packages integration for building a GoCell dependency graph from live module source.
e2egate
Package e2egate parses `go test -json` event streams and decides whether the run satisfies the e2e execution gate: at least one test must have actually executed (passed or failed), and no package may declare tests yet have all of them skipped — that pattern indicates require.Docker / PG / RMQ gates were not opened, producing a misleading green CI.
Package e2egate parses `go test -json` event streams and decides whether the run satisfies the e2e execution gate: at least one test must have actually executed (passed or failed), and no package may declare tests yet have all of them skipped — that pattern indicates require.Docker / PG / RMQ gates were not opened, producing a misleading green CI.
e2egate/cmd/e2egate command
Command e2egate is a stdin-based gate over `go test -json` event streams.
Command e2egate is a stdin-based gate over `go test -json` event streams.
generatedcatalog
Package generatedcatalog emits the build-time package dependency catalog.
Package generatedcatalog emits the build-time package dependency catalog.
generatedverify
Package generatedverify verifies checked-in generated artifacts from project-derived expectations.
Package generatedverify verifies checked-in generated artifacts from project-derived expectations.
gomodutil
Package gomodutil is the single shared go.mod module-path reader used by codegen, scaffold, the gocell CLI, and archtest.
Package gomodutil is the single shared go.mod module-path reader used by codegen, scaffold, the gocell CLI, and archtest.
internal/fileroles
Package fileroles classifies module-relative file paths into the two disjoint roles that the GoCell archtest suite needs: production code and test code.
Package fileroles classifies module-relative file paths into the two disjoint roles that the GoCell archtest suite needs: production code and test code.
metricschema
Package metricschema builds the generated metrics schema from type-checked assembly reachability.
Package metricschema builds the generated metrics schema from type-checked assembly reachability.
nogo/unconditionalskip
Package unconditionalskip defines a go/analysis analyzer that flags test functions whose first statement is an unconditional t.Skip / t.Skipf / t.SkipNow call.
Package unconditionalskip defines a go/analysis analyzer that flags test functions whose first statement is an unconditional t.Skip / t.Skipf / t.SkipNow call.
nogo/unconditionalskip/cmd/gocell-vet command
Command gocell-vet is a standalone vet driver that runs the unconditionalskip analyzer via singlechecker.Main.
Command gocell-vet is a standalone vet driver that runs the unconditionalskip analyzer via singlechecker.Main.
packagesload
Package packagesload is the single sanctioned entry point for golang.org/x/tools/go/packages.Load across GoCell tooling.
Package packagesload is the single sanctioned entry point for golang.org/x/tools/go/packages.Load across GoCell tooling.
pg-migrate command
Command pg-migrate applies all embedded postgres migrations against the database at GOCELL_PG_DSN (or the -dsn flag if provided).
Command pg-migrate applies all embedded postgres migrations against the database at GOCELL_PG_DSN (or the -dsn flag if provided).
protobuild
Package protobuild is the home of the GoCell proto -> .pb.go toolchain conformance check.
Package protobuild is the home of the GoCell proto -> .pb.go toolchain conformance check.
slowgate command
Command slowgate enforces a wall-clock budget on individual Go tests by reading `go test -json` events from stdin.
Command slowgate enforces a wall-clock budget on individual Go tests by reading `go test -json` events from stdin.
typesutil
Package typesutil exposes small, dependency-light helpers around go/types for test and tool code in this module.
Package typesutil exposes small, dependency-light helpers around go/types for test and tool code in this module.
workspace
Package workspace enumerates the Go modules of a GoCell workspace.
Package workspace enumerates the Go modules of a GoCell workspace.

Jump to

Keyboard shortcuts

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