Module Octez_smart_rollup.Installer_config

Handling of YAML configuration file used by the kernel installer.

A configuration has the form: ``` instructions:

type Tezos_base.TzPervasives.error +=
  1. | Installer_config_yaml_error of string
  2. | Installer_config_invalid
  3. | Installer_config_invalid_instruction of int
type instr =
  1. | Set of {
    1. value : string;
    2. to_ : string;
    }
type t = instr list
val make : key:string -> value:string -> instr
val pp : Stdlib.Format.formatter -> t -> unit
val parse_yaml : string -> t Tezos_base.TzPervasives.tzresult

parse_yaml content parses content as a YAML representing the configuration of the kernel installer, and returns the corresponding set of instructions.

val generate_yaml : t -> Yaml.yaml Tezos_base.TzPervasives.tzresult

generate_yaml instrs generates the YAML representation of instrs.

val emit_yaml : t -> string Tezos_base.TzPervasives.tzresult

emit_yaml instrs generates the YAML representation of instrs in textual format.

val to_file : t -> output:string -> unit Tezos_base.TzPervasives.tzresult Lwt.t

to_file instrs ~output writes the instructions into a file, either in JSON or YAML depending on the extension of output.