aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2020-02-27 08:52:08 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2020-02-27 09:37:24 +0200
commitf162128427e54f18046bf234403f402d7fc5393e (patch)
treebfcefd39e4f425d8f3931473bc98415f19b0042c /README
parentdd6380a70bd223424e4195add16b6ace45841e48 (diff)
downloadping903-f162128427e54f18046bf234403f402d7fc5393e.tar.gz
ping903-f162128427e54f18046bf234403f402d7fc5393e.tar.bz2
Process updates asynchronously.
Instead of directly modifying the host list, update requests are queued and applied to the list at the start of the next ping cycle. This speed ups updates and avoids their adverse effect on non-destructive get requests. * README: Document changes. * doc/ping903.conf.5: Document the http-backlog-size parameter. * src/ping903.c (http_response_detail): New function. (ept_ip_delete, ept_ip_put, ept_ip_post) (ept_host_stat, ept_ip_stat): Provide meanungful error descriptions. * src/ping903.h: Definitions for the Update and Get error codes. * src/pinger.c: Queue update requests and commit them to the main host list at the beginning of the ping cycle. (update_mutex): New variable. (check_host,update_add) (update_commit): New functions. (hostlist_updated): Remove variable. (get_hostname_stat,get_ipaddr_stat,get_all_host_stat) (get_all_hosts,get_host_matches): Return meaningful error codes. (pinger_host_delete_by_name,pinger_host_add_name) (pinger_hostlist_set): Operate on the update request queue instead of the main host list. Return meaningful error codes. (start_probe): Remove. (p903_scheduler): Commit updates at the beginning of the cycle. Lock the list using sendq_mutex. (p903_saver): Call update_commit.
Diffstat (limited to 'README')
-rw-r--r--README14
1 files changed, 13 insertions, 1 deletions
diff --git a/README b/README
index 2b78c51..688d431 100644
--- a/README
+++ b/README
@@ -381,7 +381,16 @@ element of the "ip-list" array, the "index" attribute contains the
** PUT /config/ip-list/IP
Adds IP to the current IP list. Returns HTTP status 201 (Created) on
-success. If such an IP is already in the list, returns 403 (Forbidden).
+success. On error, the following codes can be returned:
+ - 403 (Forbidden)
+ The entry for this IP address already exists or (if a hostname is
+ given) the argument cannot be resolved to a IPv4 address. If the
+ Content-Type of the response is "application/json", the "message"
+ attribute of the returned JSON object supplies an explanation of
+ the error.
+ - 500 (Internal server error)
+
+If such an IP is already in the list, returns .
** DELETE /config/ip-list/IP-OR-HOSTNAME
@@ -389,6 +398,9 @@ Deletes IP-OR-HOSTNAME from the IP list. Returns 200 (OK) on success.
If IP-OR-HOSTNAME was not found in the IP list or is immutable,
returns 404 (Not found).
+All update requests are queued and take effect at the beginning of the
+next ping probe.
+
* Copyright information:

Return to:

Send suggestions and report system problems to the System administrator.