package octez-internal-libs

  1. Overview
  2. Docs
A package that contains some libraries used by the Octez suite

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65

doc/octez-internal-libs.irmin/Irmin/Sync/Make/index.html

Module Sync.MakeSource

Parameters

module X : sig ... end

Signature

Native Synchronization

Sourcetype db = X.t

Type type for store handles.

Sourcetype commit = X.commit

The type for store heads.

Sourcetype status = [
  1. | `Empty
  2. | `Head of commit
]

The type for remote status.

Sourcetype info = X.info

The type for commit info.

Sourceval status_t : db -> status Type.t

status_t db is the value type for status of remote db.

Sourceval pp_status : status Fmt.t

pp_status pretty-prints return statuses.

Sourceval fetch : db -> ?depth:int -> Irmin__.Remote_intf.t -> (status, [ `Msg of string ]) result Lwt.t

fetch t ?depth r populate the local store t with objects from the remote store r, using t's current branch. The depth parameter limits the history depth. Return `Empty if either the local or remote store do not have a valid head.

Sourceval fetch_exn : db -> ?depth:int -> Irmin__.Remote_intf.t -> status Lwt.t

Same as fetch but raise Invalid_argument if either the local or remote store do not have a valid head.

Sourcetype pull_error = [
  1. | `Msg of string
  2. | Merge.conflict
]

The type for pull errors.

Sourceval pp_pull_error : pull_error Fmt.t

pp_pull_error pretty-prints pull errors.

Sourceval pull : db -> ?depth:int -> Irmin__.Remote_intf.t -> [ `Merge of unit -> info | `Set ] -> (status, pull_error) result Lwt.t

pull t ?depth r s is similar to fetch but it also updates t's current branch. s is the update strategy:

  • `Merge uses Head.merge. Can return a conflict.
  • `Set uses S.Head.set.
Sourceval pull_exn : db -> ?depth:int -> Irmin__.Remote_intf.t -> [ `Merge of unit -> info | `Set ] -> status Lwt.t

Same as pull but raise Invalid_arg in case of conflict.

Sourcetype push_error = [
  1. | `Msg of string
  2. | `Detached_head
]

The type for push errors.

Sourceval pp_push_error : push_error Fmt.t

pp_push_error pretty-prints push errors.

Sourceval push : db -> ?depth:int -> Irmin__.Remote_intf.t -> (status, push_error) result Lwt.t

push t ?depth r populates the remote store r with objects from the current store t, using t's current branch. If b is t's current branch, push also updates the head of b in r to be the same as in t.

Note: Git semantics is to update b only if the new head if more recent. This is not the case in Irmin.

Sourceval push_exn : db -> ?depth:int -> Irmin__.Remote_intf.t -> status Lwt.t

Same as push but raise Invalid_argument if an error happens.

OCaml

Innovation. Community. Security.