synapse-sdk 0.0.2

SDK for building Synapse microservices
Documentation

Synapse SDK for building services

Provides high-level abstractions for:

  • Making RPC calls to other services through the gateway
  • Implementing service handlers
  • Service registration and lifecycle

Axum Integration

To embed Synapse RPC into an existing axum application:

use axum::{Router, routing::post};
use synapse_sdk::{axum::synapse_rpc_handler, axum::SynapseState, Service};

let service = Service::builder("my-service").build();
let state = SynapseState::new(service.rpc_server().clone());

let app = Router::new()
    .route("/my-endpoints", get(my_handler))
    .route("/rpc", post(synapse_rpc_handler))
    .with_state(state);