Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file implementation.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106openCore_kernelopenAsync_kernelopenProtocolopenImplementation_types.ImplementationmoduleExpert=structmoduleResponder=structtypet=Expert.Responder.t={query_id:Query_id.t;writer:Transport.Writer.t;mutableresponded:bool}[@@derivingsexp_of]letcreatequery_idwriter={query_id;writer;responded=false};;endtypeimplementation_result=Expert.implementation_result=|Replied|Delayed_responseofunitDeferred.tendmoduleF=structtype('a,'b)result_mode=('a,'b)F.result_mode=|Blocking:('a,'a)result_mode|Deferred:('a,'aDeferred.t)result_modetype('connection_state,'query,'init,'update)streaming_impl=('connection_state,'query,'init,'update)F.streaming_impl=|Pipeof('connection_state->'query->('init*'updatePipe.Reader.t,'init)Result.tDeferred.t)|Directof('connection_state->'query->'updateImplementation_types.Direct_stream_writer.t->('init,'init)Result.tDeferred.t)type'connection_statet='connection_stateF.t=|One_way:'msgBin_prot.Type_class.reader*('connection_state->'msg->unit)->'connection_statet|One_way_expert:('connection_state->Bigstring.t->pos:int->len:int->unit)->'connection_statet|Rpc:'queryBin_prot.Type_class.reader*'responseBin_prot.Type_class.writer*('connection_state->'query->'result)*('response,'result)result_mode->'connection_statet|Rpc_expert:('connection_state->Expert.Responder.t->Bigstring.t->pos:int->len:int->'result)*(Expert.implementation_result,'result)result_mode->'connection_statet|Streaming_rpc:'queryBin_prot.Type_class.reader(* 'init can be an error or an initial state *)*'initBin_prot.Type_class.writer*'updateBin_prot.Type_class.writer*('connection_state,'query,'init,'update)streaming_impl->'connection_statetletliftt~f=matchtwith|One_way(bin_msg,impl)->One_way(bin_msg,funstatestr->impl(fstate)str)|One_way_expertimpl->One_way_expert(funstatebuf~pos~len->impl(fstate)buf~pos~len)|Rpc(bin_query,bin_response,impl,result_mode)->Rpc(bin_query,bin_response,(funstateq->impl(fstate)q),result_mode)|Rpc_expert(impl,result_mode)->Rpc_expert((funstaterespbuf~pos~len->impl(fstate)respbuf~pos~len),result_mode)|Streaming_rpc(bin_q,bin_i,bin_u,impl)->letimpl=matchimplwith|Pipeimpl->Pipe(funstateq->impl(fstate)q)|Directimpl->Direct(funstateqw->impl(fstate)qw)inStreaming_rpc(bin_q,bin_i,bin_u,impl)endtypenonrec'connection_statet='connection_statet={tag:Rpc_tag.t;version:int;f:'connection_stateF.t}letdescriptiont={Description.name=Rpc_tag.to_stringt.tag;version=t.version}letliftt~f={twithf=F.lift~ft.f}