package mgit

  1. Overview
  2. Docs

Module Mgit_sync.MakeSource

Parameters

module Flow : S

Signature

Sourceval run : Flow.t -> ('a, [> `Msg of string ] as 'b) Mgit_sync__.Protocol.t -> ('a, 'b) result
Sourcetype remote = {
  1. ctx : Flow.ctx;
  2. edn : Endpoint.t;
}
Sourceval reword : ('a, [< `End_of_input | `Err of string | `Expected_eol | `Invalid_pkt_line | `Invalid_version of string | `No_branch | `No_side_band | `Not_enough_space ]) Mgit_sync__.Protocol.t -> ('a, [> `Msg of string ]) Mgit_sync__.Protocol.t
Sourceval context : remote -> Flow.ctx
Sourceval paths : 'a -> 'a store -> uid option -> (string, Carton.Uid.t) Hashtbl.t
Sourceval diff : before:('a, Carton.Uid.t) Hashtbl.t -> after:('a, Carton.Uid.t) Hashtbl.t -> [> `Add of 'a | `Rem of 'a | `Set of 'a ] list
Sourceval commits : 'a -> 'a store -> uid list -> uid list
Sourceval heads : 'a -> 'a store -> uid list
Sourceval is_ancestor : 'a -> 'a store -> of_:uid -> Carton.Uid.t -> bool
Sourceval shallows : 'a -> 'a store -> uid list
Sourceval negotiator : 'a -> 'a store -> deepen:'b option -> Mgit_sync__.Smart.refs -> Mgit_sync__.Negotiator.t
Sourceval replace : ('a * 'b) list -> 'a -> 'b -> ('a * 'b) list
Sourceval targets : 'a -> 'a store -> ?only:??? -> Mgit_sync__.Smart.refs -> ((string * uid) list, [> `Msg of string | `Not_found of string ]) result
Sourceval receive : 'a -> 'a store -> ?deepen:??? -> stateless:bool -> Flow.t -> Mgit_sync__.Protocol.ctx -> Mgit_sync__.Smart.advertisement -> Mgit_sync__.Smart.refs -> Carton.Uid.t list -> (string, 'b) Flux.sink -> (int, [> `Msg of string ]) result
Sourcetype 'tmp located = {
  1. kind : Carton.Kind.t;
  2. length : int;
  3. meta : 'tmp Carton.t * int;
}
Sourceval extern : 'a -> 'a store -> uid -> ([ `A | `B | `C | `D ] * Bstr.t) option
Sourceval analyse : extern:(Carton.Uid.t -> (Carton.Kind.t * Bstr.t) option) -> string Seq.t -> 'a Carton.t -> ('a Carton.t * (string, 'a located) Hashtbl.t, [> `Msg of string ]) result
Sourceval value_of_cursor : 'a Carton.t -> cursor:int -> Carton.Value.t
Sourcetype ('t, 'tmp, 'err) generation = 't -> references:(string * uid) list -> lookup:(uid -> 'tmp located option) -> reader:Mgit_change.read -> news:Mgit_change.news -> (unit, 'err) result
Sourcetype 'tmp tmp = {
  1. seq : len:int -> string Seq.t;
  2. carton : len:int -> extern:(uid -> (Carton.Kind.t * Bstr.t) option) -> 'tmp Carton.t;
  3. into : (string, unit) Flux.sink;
}
Sourceval ingest : 'a -> 'a store -> 'b tmp -> len:int -> ((uid -> 'b located option) * (uid -> (Carton.Kind.t * string) option), [> `Msg of string ]) result
Sourceval is_stateless : Endpoint.t -> bool
Sourceval reraise : exn -> 'a
Sourceval with_flow : Flow.t -> (unit -> 'a) -> 'a
Sourceval connect : Flow.ctx -> Endpoint.t -> service:string -> version:int -> (Flow.t * Mgit_sync__.Protocol.ctx, [> `Msg of string ]) result
Sourceval pull : 'a -> 'a store -> generation: ('a -> references:(string * uid) list -> lookup:(uid -> 'b located option) -> reader:(uid -> (Carton.Kind.t * string) option) -> news:Mgit_change.news -> (unit, [> `Msg of string | `Not_found of string ] as 'c) result) -> ?deepen:??? -> ?unshallow:??? -> ?only:??? -> 'b tmp -> remote option -> ((string * [> `Add of string | `Rem of string | `Set of string ] list) list, 'c) result
Sourceval push : 'a -> 'a store -> branches:string list -> pack:(Carton.Uid.t list -> (string Seq.t, [> `Msg of string ] as 'b) result) -> remote option -> (unit, 'b) result