Skip to main content

Crate unitycatalog_server

Crate unitycatalog_server 

Source
Expand description

The Unity Catalog REST API server.

This crate implements the Unity Catalog REST surface as a set of axum routers over three pluggable dependencies, injected as trait objects:

  • a ResourceStore — the persistence backend (in-memory, unitycatalog-postgres, or unitycatalog-sqlite);
  • a Policy — the authorization decision point; and
  • a CommitCoordinator — the Delta catalog-managed commit backend.

ServerHandler composes those dependencies. It is generic over an authorization context Cx (the identity or request state a Policy evaluates against), cheap to clone, and satisfies the store and policy traits by delegation — so the generated handler traits in api can be blanket-implemented over it. To swap a backend, construct the handler with a different trait object; no handler code changes.

§Layout

  • api — per-resource handler traits (generated) plus their hand-written business logic, and the SecuredAction permission mapping.
  • policy — the Policy authorization trait, Permission/Decision, and the allow-all ConstantPolicy.
  • store — storage-abstraction traits, re-exported from unitycatalog-common.
  • rest — the axum routers that expose the handlers over HTTP.
  • servicesServerHandler and the Provides* dependency-injection traits.
  • handlers — reusable handler patterns (e.g. proxy leaves that forward to an upstream catalog).

§Feature flags

memory enables the in-memory store; proxy pulls in the upstream-forwarding handlers; bin adds the config/CLI/serve wiring used by the uc-server binary. See the crate README for the full table.

Re-exports§

pub use crate::error::Error;
pub use crate::error::Result;

Modules§

api
error
handlers
Reusable handler patterns.
memory
In-memory resource store for tests and local development.
policy
Authorization for the Unity Catalog server.
rest
services
store
Storage abstraction traits.
telemetry
Telemetry initialization for the Unity Catalog server.