XRAPH/Work/Protocol
Go · since 2025

FARP

The manifest format Octopus and Bastion consume. A service describes its own API surface across OpenAPI, AsyncAPI, gRPC, GraphQL, oRPC, Thrift and Avro, along with health and capability hints, and publishes it through Consul, etcd, Kubernetes, Redis or mDNS. FARP is the spec and the Go library. It deliberately does no routing itself.

Language
Go
Category
Protocol
Since
2025
Stars
4
Repository Docs
01

Anatomy

3 modules
01

Manifest

What a service serves, at which version, with which health semantics.

02

Derivation

Routes as a pure function of the declared manifests.

03

Precedence

Deterministic resolution when two services claim a path.

02

Why it exists

Design notes

#What it is

FARP, the Forge API Gateway Registration Protocol, is how a service tells a gateway what it can do. It is a specification and a Go library: manifest data structures, schema generation, merging utilities, pluggable discovery, and lifecycle helpers.

It is deliberately not a gateway. No routing, no rate limiting, no traffic management. Drawing that line strictly is why two gateways as different as Octopus (Rust, standalone) and Bastion (Go, in-process) can both consume it.

#The manifest

A service publishes its API surface across seven formats, namely OpenAPI, AsyncAPI, gRPC, GraphQL, oRPC, Thrift and Avro, along with health information and capability hints such as whether an endpoint is safe to retry.

The generation providers build those from code, so the manifest comes from the same types that serve the requests. There is no second declaration to drift.

#Discovery

Pluggable: Consul, etcd, Kubernetes, Redis, mDNS, push-based, or your own. ServiceNode and GatewayNode handle the full lifecycle of registration, health reporting, schema publication and route updates, so a service mounts the FARP handlers on its own router and otherwise forgets about it.

#What it moved

The service already knows its routes. Every line of gateway configuration is a second copy of that knowledge, racing the first.

The concrete wins: routes disappear correctly when an instance goes away; retry policy is declared by the service that knows whether an endpoint is idempotent; and a merged OpenAPI document exists without anyone maintaining it.

03

Signals

GitHub
Stars
4
Language
Go
Since
2025
Adopters
00

Shipping something on FARP? Nobody is listed here yet. Tell me what you built and you will be the first.

Get listed