Crate bundler

source ยท
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ยง

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
  • Fetches the intial Bundle from ISPyB and produces the correspoinding BundleFile
  • 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ยง