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

  • 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
  • StaticDataGlob ๐Ÿ”’
    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
  • Fetches the initial Bundle from ISPyB and any static files, and produces the corresponding BundleFile
  • 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ยง