123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475(*
* Copyright (c) 2018-2022 Tarides <contact@tarides.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)open!ImportmoduletypeS=sig(** An abstraction on top of the index library that exposes an API that better
fits the irmin-pack use case. *)typettypekeytypevalue=int63*int*Pack_value.Kind.tincludeIndex.Swithtypevalue:=valueandtypet:=tandtypekey:=keymoduleIo:Io.Svalv_exn:?flush_callback:(unit->unit)->?fresh:bool->?readonly:bool->?throttle:[`Block_writes|`Overcommit_memory]->?lru_size:int->log_size:int->string->ttypecreate_error:=[`Index_failureofstring|`Io_miscofIo.misc_error]typewrite_error:=[`Index_failureofstring|`Io_miscofIo.misc_error|`Ro_not_allowed]valv:?flush_callback:(unit->unit)->?fresh:bool->?readonly:bool->?throttle:[`Block_writes|`Overcommit_memory]->?lru_size:int->log_size:int->string->(t,[>create_error])resultvalreload:t->(unit,[>write_error])resultvalclose:t->(unit,[>write_error])resultvalclose_exn:t->unitvalflush:t->with_fsync:bool->(unit,[>write_error])resultvalfind:t->key->valueoptionvaladd:?overcommit:bool->t->key->value->unitvalmerge:t->unitvalmem:t->key->boolvaliter:(key->value->unit)->t->unitvalfilter:t->(key*value->bool)->unitvaltry_merge:t->unitmoduleStats=Index.StatsmoduleKey:Index.Key.Swithtypet=keyendmoduletypeSigs=sigmoduletypeS=SmoduleMake(K:Irmin.Hash.S):Swithtypekey=K.tandmoduleIo=Io.Unixend