Expand description
ยงBundler
An Open Policy Agent (OPA) Bundle Server, supplying permissionalble data from the Diamond Light Source ISPyB database
Modulesยง
- built_info ๐Metadata about the crate, courtesy of built
- bundle ๐An Open Policy Agent bundle containing permissionables
- permissionables ๐Permissionable relations from the ISPyB database
- require_bearer ๐A [
tower::Service
] which enforces a bearer token requirement
Structsยง
- BundleFile ๐A wrapper containing a
Bundle
and the serialzied gzipped archive - BundleSchemaArgs ๐Arguments to output the schema with
- ServeArgs ๐Arguments to run the service with
Enumsยง
- Cli ๐Bundler acts as a Open Policy Agent bundle server, providing permissionable data from the ISPyB database
Functionsยง
- bundle_endpoint ๐Returns the Open Policy Agent bundle in gzipped tar format
- bundle_schema ๐Outputs the bundle schema as a set of files or to standard output
- connect_ispyb ๐Creates a connection pool to the ISPyB instance at the provided
Url
- fallback_endpoint ๐Returns a HTTP 404 status code when a non-existant route is queried
- fetch_initial_bundle ๐Fetches the intial
Bundle
from ISPyB and produces the correspoindingBundleFile
- health_endpoint ๐Returns an HTTP 200 response when requested.
- main ๐
- serve ๐Runs the service, pulling fresh bundles from ISPyB and serving them via the API
- serve_endpoints ๐Bind to the provided socket address and serve the application endpoints
- setup_telemetry ๐Sets up Logging & Tracing using jaeger if available
- update_bundle ๐Periodically update the bundle with new data from ISPyB
Type Aliasesยง
- CurrentBundle ๐A thread safe, mutable, wrapper around the
BundleFile