Skip to content

Adopt the same configuration interface as mirage-block-unix #29

@djs55

Description

@djs55

mirage-block-unix now has an interface like

module Config: sig
  type t = {
    foo: bar;
    path: string;
  }
  val create ?foo -> string -> t
  val to_string: t -> string
  val of_string: string -> ...
end

val connect: ?foo -> string -> t io
val to_config: t -> Config.t
val of_config: Config.t -> t io

This is nice because you can either pass around serialised configuration records (e.g. read from a config file) or you can use the connect directly. We should adopt this style so that it becomes easier to add support for TRIM, which will require additional options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions