Skip to main content

Crate ravenrs_report_server

Crate ravenrs_report_server 

Source
Expand description

Report server for RavenRS Reporting: stores layouts with versions, renders them over HTTP and delivers scheduled reports by email or to a folder.

  • config reads the server’s configuration; secrets come from the environment.
  • store keeps layouts, jobs, history and documents as files.
  • cron parses schedules and finds the next run, time zones included.
  • job is the job format and its validation.
  • render resolves a layout’s data and writes the output files.
  • deliver sends files by email or writes them to a folder.
  • scheduler runs what is due, with retries, history and retention.
  • http is the API.

The binary runs all of it from a configuration file. The server has one administrative identity, its API token, and is meant to run as one instance.

Modules§

config
The server’s configuration. Secrets are never in the file: it names the environment variables that hold them.
cron
Cron schedules: five fields (minute, hour, day of month, month, day of week), with *, lists, ranges, steps and English month and day names.
deliver
Sends a run’s files: by email, or to a folder under the server’s output folder.
http
The HTTP API. Every route but /health needs the API token.
job
Scheduled jobs: what to render, when, and where it goes.
render
Resolves a layout’s data and parameters, and writes its output files.
scheduler
Runs jobs: what is due on the schedule, or what is asked for by hand, with retries, a history of who received what, and retention of the files.
store
Keeps layouts, jobs, history and documents as files, so they can be backed up and read with ordinary tools. Every name is validated before it touches a path, and writes go through a temporary file so a crash leaves no half file.