Skip to content

Commit

Permalink
adapt example unikernel to Pgx_mirage change
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed May 12, 2020
1 parent 315a4ee commit 4acdf60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions unikernel/config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ let server =
; Key.abstract database
]
~packages
(random @-> pclock @-> mclock @-> stackv4 @-> job)
(random @-> time @-> pclock @-> mclock @-> stackv4 @-> job)
;;

let () =
register
"pgx_unikernel"
[ server $ default_random $ default_posix_clock $ default_monotonic_clock $ stack ]
[ server $ default_random $ default_time $ default_posix_clock $ default_monotonic_clock $ stack ]
;;
5 changes: 3 additions & 2 deletions unikernel/unikernel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ open Lwt.Infix

module Make
(RANDOM : Mirage_random.S)
(TIME : Mirage_time.S)
(PCLOCK : Mirage_clock.PCLOCK)
(MCLOCK : Mirage_clock.MCLOCK)
(STACK : Mirage_stack.V4) =
struct
module Pgx_mirage = Pgx_lwt_mirage.Make (RANDOM) (MCLOCK) (STACK)
module Pgx_mirage = Pgx_lwt_mirage.Make (RANDOM) (TIME) (MCLOCK) (STACK)
module Logs_reporter = Mirage_logs.Make (PCLOCK)

type user =
Expand Down Expand Up @@ -58,7 +59,7 @@ struct
users
;;

let start _random _pclock _mclock stack =
let start _random _time _pclock _mclock stack =
Logs.(set_level (Some Info));
Logs_reporter.(create () |> run)
@@ fun () ->
Expand Down

0 comments on commit 4acdf60

Please sign in to comment.