-
Notifications
You must be signed in to change notification settings - Fork 294
xapi_ha: avoid raising Not_found when joining a liveset #6734
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
Changes from all commits
b48e85e
1e6ad2e
2a5abc5
71aea4d
6bf2732
3122667
17e0edd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,12 +18,24 @@ | |
| (** Thrown when a particular named key could not be found. *) | ||
| exception Missing_key of string | ||
|
|
||
| val get : string -> string | ||
| val get : string -> string option | ||
| (** Retrieves a value *) | ||
|
|
||
| val get_with_default : string -> string -> string | ||
| (** [get_with_default key default] returns the value associated with [key], | ||
| or [default] if the key is missing. *) | ||
| val get_exn : string -> string | ||
| (** Retrieves the value for the key, raises Missing_key when the key is not | ||
| present *) | ||
|
|
||
| val get_bool : string -> bool option | ||
| (** Retrieves the value for the key, returns a value when it's found and is a | ||
| valid boolean, otherwise is [None] *) | ||
|
|
||
| val get_int : string -> int option | ||
| (** Retrieves the value for the key, returns a value when it's found and is a | ||
| valid int, otherwise is [None] *) | ||
|
|
||
| val get_of_string : (string -> 'a option) -> string -> 'a option | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This reads a bit complicated and difficult to grasp. I believe this could be phrased as a monad .
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was the best name I could muster. It's a get and then applying a user-provided function through bind. I really don't know how to name it in a succinct way. |
||
| (** [get_of_string of_string key] retrieves the value for [key], and if it | ||
| exists, processes it with [of_string], otherwise it's [None] *) | ||
|
|
||
| val put : string -> string -> unit | ||
| (** Inserts a value into the database, only returns when the insertion has | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be logged?