Skip to content

API Reference

This reference is auto-generated from the godoc comments in the fountain and ftkit source trees via npm run gen:api. The pages below are not hand-edited — to change their content, edit the godoc comments in the source and regenerate. See Regenerating below.

Framework

Core framework packages: the application entry point, lifecycle primitives, controller registration, and global constants.

  • fountain — framework entry point and lifecycle (New(), Serving())
  • runnableAppInstance, Invoker, JobInstance lifecycle interfaces
  • coreCoreController, registration, and the cross-controller observer pattern
  • constants — global K-prefixed constants

Clients

Protocol client packages.

Servers

Multi-protocol server implementations under libs/fnet.

Storage

Storage backends under libs/stored. New code should prefer fedis (see the storage migration note on the Contributing page).

Caches

In-memory and distributed cache implementations under libs/cache.

Brokers

Message broker integrations under libs/brokers.

Broker providers

Auth

Authentication packages.

Service discovery

Service discovery backends under libs/sd.

Observability

Logging, tracing, and metrics.

Resilience

Workers & tasks

Background workers, jobs, and scheduling.

Notifications

Crypto

  • crypto — cryptography helpers (hashing, encryption, signing)

System utilities

  • fcpu — CPU affinity and core utilities
  • fcycle — application lifecycle hooks
  • ip2geo — IP-to-geography lookup
  • k8f — Kubernetes helpers
  • buff — byte buffer pool

Utilities

General-purpose utilities.

  • env — environment configuration helpers
  • fcontext — context helpers
  • ferr — error wrapping and handling
  • fflag — feature flags
  • validator — input validation

Base utilities

Low-level utility packages under libs/base.

ftkit

Reference for the ftkit toolkit packages.

Regenerating

These pages are produced by npm run gen:api. Regeneration requires the sibling fountain and ftkit repositories checked out alongside fountain-docs (their locations can be overridden with the FOUNTAIN_SRC and FTKIT_SRC environment variables), plus gomarkdoc installed:

bash
go install github.com/princjef/gomarkdoc/cmd/gomarkdoc@latest
npm run gen:api