package mc2

  1. Overview
  2. Docs
type plugin = t
type t =
  1. | Factory : {
    1. name : string;
    2. priority : int;
      (*

      how prioritary this plugin is. The lower, the earlier this plugin is loaded. NOTE: if plugin b requires services provided by plugin a, then we need to ensure a.priority < b.priority

      *)
    3. requires : 'a service_key_list;
      (*

      list of required services

      *)
    4. build : int -> 'a service_list -> plugin;
      (*

      builder, taking:

      • the unique ID of the plugin
      • the list of services required by requires
      *)
    } -> t
    (*

    A plugin factory, i.e. the method to build a plugin with a given ID.

    *)
val compare : t -> t -> int
val make : ?priority:int -> name:string -> requires:'a service_key_list -> build:(int -> 'a service_list -> plugin) -> unit -> t
OCaml

Innovation. Community. Security.