package dkml-install

  1. Overview
  2. Docs
API and registry for Diskuv OCaml (DKML) installation components

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1.0.tar.gz
md5=9c2fc122d49103ce9bf513fcc11b443d
sha512=c746d7a4482109c725bfe44542c146914add4d77e8e76556ce0de6e2567683a7ac7dc9909f1252aea7facbcf130153b8e752607a3c44e35b8cfd8ea5d99eb356

doc/dkml-install.register/Dkml_install_register/Component_registry/index.html

Module Dkml_install_register.Component_registrySource

The Component_registry is a global registry of all components that have been registered until now.

Component authors should follow this sequence:

    open Dkml_install_api

    module Component : Component_config = struct
      include Default_component_config
      let component_name = "...the..component..name..."
      (** Redefine any other values you want to override *)
    end
    let reg = Component_registry.get ()
    let () = Component_registry.add_component reg (module Component : Component_config)
Sourcetype t

The type of the component registry

Sourcetype component_selector =
  1. | All_components
  2. | Just_named_components_plus_their_dependencies of string list

The type of the component selector. Either all components, or just the specified components plus all of their dependencies.

Sourceval get : unit -> t

Get a reference to the global component registry

Sourceval add_component : ?raise_on_error:bool -> t -> (module Dkml_install_api.Component_config) -> unit

add_component ?raise_on_error registry component adds the component to the registry.

Ordinarily if there is an error a process exit is performed. Set raise_on_error to true to raise an Invalid_argument error instead.

Sourceval validate : ?raise_on_error:bool -> t -> unit

validate ?raise_on_error registry succeeds if and only if all dependencies of all add_component registry have been themselves added.

Ordinarily if there is an error a process exit is performed. Set raise_on_error to true to raise an Invalid_argument error instead.

eval registry ~f ~fl iterates through the registry in dependency order, executing function f on each component configuration.

Errors will go to the fatal logger fl.

reverse_eval registry ~f ~fl iterates through the registry in reverse dependency order, executing function f on each component configuration.

Errors will go to the fatal logger fl.

Sourcemodule Private : sig ... end

The module Private is meant for internal use only.