-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5250 from Vincent-lau/private/shul2/tracing-clusterd
CP-45469: Distributed tracing for xapi-clusterd
- Loading branch information
Showing
13 changed files
with
416 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
(* | ||
* Copyright (C) Cloud Software Group | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published | ||
* by the Free Software Foundation; version 2.1 only. with the special | ||
* exception on linking described in file LICENSE. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
*) | ||
|
||
type dict = (string * string) list [@@deriving rpcty] | ||
|
||
let option ?name ?(description = []) d = | ||
let open Rpc.Types in | ||
let name = | ||
Option.fold ~none:(Printf.sprintf "%s option" d.name) ~some:Fun.id name | ||
in | ||
{name; description; ty= Option d.ty} | ||
|
||
let list ?name ?(description = []) d = | ||
let open Rpc.Types in | ||
let name = | ||
Option.fold ~none:(Printf.sprintf "list of %ss" d.name) ~some:Fun.id name | ||
in | ||
{name; description; ty= List d.ty} | ||
|
||
let pair ?name ?(description = []) (p0, p2) = | ||
let open Rpc.Types in | ||
let name = | ||
Option.fold | ||
~none:(Printf.sprintf "pair of %s and %s" p0.name p2.name) | ||
~some:Fun.id name | ||
in | ||
{name; description; ty= Tuple (p0.ty, p2.ty)} | ||
|
||
let triple ?name ?(description = []) (p1, p2, p3) = | ||
let open Rpc.Types in | ||
let name = | ||
Option.fold | ||
~none:(Printf.sprintf "triple of %s, %s and %s" p1.name p2.name p3.name) | ||
~some:Fun.id name | ||
in | ||
{name; description; ty= Tuple3 (p1.ty, p2.ty, p3.ty)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
(* | ||
* Copyright (C) Cloud Software Group | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published | ||
* by the Free Software Foundation; version 2.1 only. with the special | ||
* exception on linking described in file LICENSE. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
*) | ||
|
||
type dict = (string * string) list | ||
|
||
val typ_of_dict : (string * string) list Rpc.Types.typ | ||
|
||
val dict : (string * string) list Rpc.Types.def | ||
|
||
val option : | ||
?name:string | ||
-> ?description:string list | ||
-> 'a Rpc.Types.def | ||
-> 'a option Rpc.Types.def | ||
|
||
val list : | ||
?name:string | ||
-> ?description:string list | ||
-> 'a Rpc.Types.def | ||
-> 'a list Rpc.Types.def | ||
|
||
val pair : | ||
?name:string | ||
-> ?description:string list | ||
-> 'a Rpc.Types.def * 'b Rpc.Types.def | ||
-> ('a * 'b) Rpc.Types.def | ||
|
||
val triple : | ||
?name:string | ||
-> ?description:string list | ||
-> 'a Rpc.Types.def * 'b Rpc.Types.def * 'c Rpc.Types.def | ||
-> ('a * 'b * 'c) Rpc.Types.def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.