Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cohttp-mirage: support conduit 8.0.0 #1104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cohttp-mirage.opam
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ depends: [
"ocaml" {>= "4.08"}
"mirage-flow" {>= "2.0.0"}
"mirage-channel" {>= "4.0.0"}
"conduit" {>= "2.0.2"}
"conduit-mirage" {>= "2.3.0"}
"conduit" {>= "8.0.0"}
"conduit-mirage" {>= "8.0.0"}
"mirage-kv" {>= "3.0.0"}
"lwt" {>= "2.4.3"}
"cohttp-lwt" {= version}
Expand Down
3 changes: 1 addition & 2 deletions cohttp-mirage/src/client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
*)

module Make
(P : Mirage_clock.PCLOCK)
(R : Resolver_mirage.S)
(S : Conduit_mirage.S) =
struct
module Net = Net.Make (P) (R) (S)
module Net = Net.Make (R) (S)
module Connection = Cohttp_lwt.Connection.Make (Net)
include Cohttp_lwt.Client.Make (Connection)

Expand Down
1 change: 0 additions & 1 deletion cohttp-mirage/src/client.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module Make
(_ : Mirage_clock.PCLOCK)
(R : Resolver_mirage.S)
(S : Conduit_mirage.S) : sig
module Connection : Cohttp_lwt.S.Connection
Expand Down
4 changes: 1 addition & 3 deletions cohttp-mirage/src/net.ml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
module Make
(P : Mirage_clock.PCLOCK)
(R : Resolver_mirage.S)
(S : Conduit_mirage.S) =
struct
module Channel = Mirage_channel.Make (S.Flow)
module Input_channel = Input_channel.Make (Channel)
module Endpoint = Conduit_mirage.Endpoint (P)
module IO = Io.Make (Channel)
open IO

Expand All @@ -25,7 +23,7 @@ struct
let resolve ~ctx uri = R.resolve_uri ~uri ctx.resolver

let connect_endp ~ctx endp =
Endpoint.client ?tls_authenticator:ctx.authenticator endp >>= fun client ->
Conduit_mirage.Endpoint.client ?tls_authenticator:ctx.authenticator endp >>= fun client ->
match ctx.conduit with
| None -> failwith "conduit not initialised"
| Some c ->
Expand Down
1 change: 0 additions & 1 deletion cohttp-mirage/src/net.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module Make
(_ : Mirage_clock.PCLOCK)
(R : Resolver_mirage.S)
(S : Conduit_mirage.S) : sig
type ctx = {
Expand Down
Loading