package obuilder

  1. Overview
  2. Docs
type t
type context
val build : t -> context -> Obuilder_spec.t -> (id, [> `Cancelled | `Msg of string ]) Lwt_result.t
val finish : t -> unit Lwt.t

finish builder close allocated resources and store state (e.g., sqlite3 databases).

val delete : ?log:(id -> unit) -> t -> id -> unit Lwt.t

delete ?log t id removes id from the store, along with all of its dependencies. This is for testing. Note that is not safe to perform builds while deleting: the delete might fail because an item got a new child during the delete, or we might delete something that the build is using.

  • parameter log

    Called just before deleting each item, so it can be displayed.

val prune : ?log:(id -> unit) -> t -> before:Unix.tm -> int -> int Lwt.t

prune t ~before n attempts to remove up to n items from the store, all of which were last used before before. Returns the number of items removed.

  • parameter log

    Called just before deleting each item, so it can be displayed.

val count : t -> int64

count t return number of items in the store.

val df : t -> float Lwt.t

df t returns the percentage of free space in the store.

val cache_stats : t -> int * int

cache_stats t returns the number of cache hits and the number of cache misses.

val healthcheck : ?timeout:float -> t -> (unit, [> `Msg of string ]) Lwt_result.t

healthcheck t performs a check that t is working correctly.

  • parameter timeout

    Cancel and report failure after this many seconds. This excludes the time to fetch the base image.

OCaml

Innovation. Community. Security.