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ยง
- Bundle
File ๐ - A wrapper containing a
Bundle
and the serialzied gzipped archive - Bundle
Schema ๐Args - Arguments to output the schema with
- Serve
Args ๐ - Arguments to run the service with
- Static
Data ๐Glob - Wrapper to ensure that globs passed via the CLI are valid file globs
Enumsยง
- Cli ๐
- Bundler acts as an Open Policy Agent bundle server, providing permissionable data from the ISPyB database and static data from local files
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 initial
Bundle
from ISPyB and any static files, and produces the correspondingBundleFile
- health_
endpoint ๐ - Returns an HTTP 200 response when requested.
- main ๐
- serve ๐
- Runs the service, pulling fresh bundles from ISPyB/local files 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 and any static files matching the given glob patterns.
Type Aliasesยง
- Current
Bundle ๐ - A thread safe, mutable, wrapper around the
BundleFile