File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ let parse_exn s =
24
24
if name = " " then Exn. fail " empty name" ;
25
25
{ id; host= String. lowercase host; name= get_name @@ String. lowercase name; stamp; })
26
26
27
+ let make ~id ~host ~stamp name =
28
+ validate_name " name" name;
29
+ validate_name " host" host;
30
+ { id; host; stamp; name }
31
+
27
32
let new_self name stamp =
28
33
let id = Unix. getpid () in
29
34
let host = String. lowercase @@ Unix. gethostname () in
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ val name : t -> string
22
22
(* * @return string representation of pid, can be read back by [parse_pid_exn] *)
23
23
val to_string : t -> string
24
24
25
+ val make : id :int -> host :string -> stamp :int -> string -> t
26
+
25
27
val compare : t -> t -> int
26
28
val equal : t -> t -> bool
27
29
You can’t perform that action at this time.
0 commit comments