Module Object

module Object: sig .. end
Build objects.

The objects are built by jobs executed by workers.


type id = [ `Object ] Id.t 
The type for object identifiers. Object identifiers are deterministic, i.e. two similar objects will have the same identifiers. The notion of similiraty depends on the object type.
type archive = {
   files : (string * Digest.t) list;
   raw : Cstruct.t;
}
The type for archive values.
type file = string * Cstruct.t 
The type for UTF-8 encoded files.
type contents = 
| Archive of archive
| File of file
The type for object contents. Can either be an UTF-8 encoded Object.file or an Object.archive.
type kind = [ `Archive | `File ] 
The type for object kinds.
type t 
The type for object values.
val id : t -> id
id t is t's id.
val contents : t -> contents
contents t is ts contents.
val kind : t -> kind
kind t is t's kind.
val archive : (string * Digest.t) list -> Cstruct.t -> t
archive f c is the archive containing the files f and with raw contents c.
val file : string -> Cstruct.t -> t
file f c is the file f whose contents is c.
val equal : t -> t -> bool
equal is the equality function for objects.
val pp : t Fmt.t
pp format objects.
val json : t Jsont.codec
json is the JSON codec for objects.