package datakit-ci

  1. Overview
  2. Docs

Web Configuration

type config

The type for web configuration.

val config : ?name:string -> ?state_repo:Uri.t -> ?metrics_token:[ `SHA256 of string ] -> ?listen_addr:[ `HTTP of int | `HTTPS of int ] -> can_read:ACL.t -> can_build:ACL.t -> unit -> config

config ~name ~state_repo ~can_read ~can_build () is a web configuration. If name is given, it is used as the main heading, and also as the name of the session cookie (useful if you run multiple CIs on the same host, on different ports). If state_repo is given, it is used to construct links to the state repository on GitHub. If metrics_token is Some (`SHA256 expected) given then doing an HTTP GET on /metrics with an Authorization header containing "Bearer TTT" will return Prometheus-format metrics if sha256(TTT) = expected. There is no rate limiting, so pick a long token.

OCaml

Innovation. Community. Security.