Skip to main content

Crate ograf_core

Crate ograf_core 

Source
Expand description

The pure OGraf-spec Core server: graphics, renderers, actions, and the renderer WebSocket protocol. Knows nothing about zones, API keys, or admin accounts — every access decision is delegated to whatever access::AccessControl implementation the binary wires in (Dependency Inversion principle). A consumer that wants no access control at all can use access::AllowAllAccessControl.

Modules§

access
Dependency Inversion seam: Core defines what access control it needs, never how it’s decided. Consumers can provide their own implementation; AllowAllAccessControl is a trivial one for anyone who wants no restriction at all.
config
directory
Which renderers exist beyond the ones connected right now — a second Dependency Inversion seam next to AccessControl. Core itself keeps no storage: it remembers disconnected renderers only for the life of the process. A consumer with a database (or a config file, or an NMOS registry) implements RendererDirectory so controllers can see renderers that are offline, or haven’t connected yet — reported with status: ERROR.
error
handlers
models
protocol
Wire protocol types for OGraf v1 Server API — messages sent between server and renderer over WebSocket. These types define the JSON structure on the wire; server-internal bookkeeping lives in models.
renderer_ws
store

Structs§

AppState
Router
The router type for composing handlers and services.

Constants§

RENDERER_CONNECT_PATH
Where renderers open their WebSocket (GET, upgraded). Outside /ograf/v1 on purpose, see build_router.

Functions§

build_router
Builds the /ograf/v1/* API router plus the internal graphic-asset route used by the renderer HTML — everything a consumer needs to nest under its own top-level router alongside its own admin routes. Static file serving (/renderer, admin UI) and CORS/tracing layers are the binary’s own concern, not Core’s.