Expand description
FARP - Forge API Gateway Registration Protocol
FARP is a protocol specification for enabling service instances to automatically register their API schemas, health information, and capabilities with API gateways and service meshes.
§Overview
FARP provides:
- Schema-aware service discovery (OpenAPI, AsyncAPI, gRPC, GraphQL)
- Dynamic gateway configuration based on registered schemas
- Multi-protocol support with extensibility
- Health and telemetry integration
- Backend-agnostic storage (Consul, etcd, Kubernetes, Redis, Memory)
- Push and pull models for schema distribution
- Zero-downtime schema updates with versioning
§Basic Usage
Creating a schema manifest:
use farp::{types::*, manifest::new_manifest};
let mut manifest = new_manifest("user-service", "v1.2.3", "instance-abc123");
manifest.capabilities.push("rest".to_string());
manifest.endpoints.health = "/health".to_string();§Feature Flags
default: Core types + memory registryproviders-openapi: OpenAPI providerproviders-asyncapi: AsyncAPI providerproviders-grpc: gRPC providerproviders-graphql: GraphQL providerproviders-orpc: oRPC providerproviders-avro: Avro providerproviders-thrift: Thrift providerproviders-all: All providersgateway: Gateway client implementationfull: Everything enabled
Re-exports§
pub use errors::Error;pub use errors::Result;pub use version::get_version;pub use version::is_compatible;pub use version::PROTOCOL_VERSION;
Modules§
- errors
- Error types for FARP operations.
- manifest
- Manifest operations including creation, validation, checksums, and diffing.
- merger
- OpenAPI schema merger for combining multiple service schemas
- prelude
- Prelude module for convenient imports
- provider
- Schema provider traits and registry.
- providers
- Schema provider implementations
- registry
- storage
- Storage backend abstraction and utilities.
- types
- Core type definitions for FARP protocol.
- version
- Protocol version constants and compatibility checking.