ligo/lib_rpc-http/RPC_server.mli

31 lines
1.0 KiB
OCaml
Raw Normal View History

2016-09-08 19:13:10 +02:00
(**************************************************************************)
(* *)
2017-11-14 00:36:14 +01:00
(* Copyright (c) 2014 - 2017. *)
2016-09-08 19:13:10 +02:00
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
(** Typed RPC services: server implementation. *)
2016-09-08 19:13:10 +02:00
type cors = {
allowed_headers : string list ;
allowed_origins : string list ;
}
(** A handle on the server worker. *)
type server
2016-09-08 19:13:10 +02:00
(** Promise a running RPC server.*)
val launch :
?host:string ->
?cors:cors ->
2017-12-07 17:43:21 +01:00
media_types:Media_type.t list ->
Conduit_lwt_unix.server ->
2017-12-09 03:51:58 +01:00
unit RPC_directory.t ->
server Lwt.t
(** Kill an RPC server. *)
val shutdown : server -> unit Lwt.t