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 aBundle
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 providedUrl
- fallback_
endpoint ๐Returns a HTTP 404 status code when a non-existant route is queried - fetch_
initial_ ๐bundle Fetches the initialBundle
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 theBundleFile