Commit | Line | Data |
---|---|---|
c6a7396e SK |
1 | type content = |
2 | | Alert of {priority : [`low | `med | `hi]; subject : string; body : string} | |
3 | | Data of {key : string list; value : string} | |
4 | | Cache of | |
5 | { mtime : Khatus_time.t | |
6 | ; node : string | |
7 | ; modul : string | |
8 | ; key : string list | |
9 | ; value : string | |
10 | } | |
11 | | Error of string | |
12 | | Log of {location : string; level : [`info | `error]; msg : string} | |
13 | | Status_bar of string | |
14 | ||
15 | type t = | |
16 | {node : string; modul : string; content : content} | |
17 | ||
6f35286a SK |
18 | type 'a data_handler = |
19 | (node:string -> modul:string -> key:string list -> value:string -> 'a) | |
20 | ||
c6a7396e SK |
21 | val to_string : t -> string |
22 | ||
6f35286a | 23 | val handle_data : t -> f:'a data_handler -> otherwise:'a -> 'a |