Skip to main content

Crate breathe_api_server

Crate breathe_api_server 

Source
Expand description

breathe-api-server — the REST surface over the breathe_facade core.

Every route is a thin call into the same BreatheStore the MCP drives, so the two surfaces can never diverge. The path/verb set mirrors spec/breathe.openapi.yaml (the source of truth); the handlers are kube-rs facade calls — the one place breathe legitimately hand-serves (a generic kube::Api<T> dispatch that forge-gen’s HTTP-client model fits poorly).

Modules§

graphql
The GraphQL surface (async-graphql) over the same facade. Resolvers return the CRD JSON via the Json scalar so there is one typed source of truth.
grpc
The gRPC surface (tonic) over the same facade — now with TYPED proto messages (no JSON-string envelope). proto/breathe.proto is generated by grpc-forge from spec/breathe.openapi.yaml; pbjson makes the messages serde-capable, so the facade’s serde_json::Value bridges straight into the typed responses via [typed]. The handler is the one place breathe legitimately hand-serves (a generic kube::Api<T> dispatch) — it just maps facade JSON ↔ typed proto.

Functions§

router
The full HTTP router: REST + a /graphql endpoint, both over the shared facade. store is the real KubeStore or a mock.

Type Aliases§

SharedStore