summaryrefslogtreecommitdiffstats
path: root/src/rest.h
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-05-22 15:47:45 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-05-30 11:16:20 +0200
commit6666aba8b7063d4475636336d7798a30c26dde92 (patch)
tree0b042fe6aeec7fa25a396dc269ebd14819116679 /src/rest.h
parentefb5f2758506ef875e376e40e978b1f03bf0ef8c (diff)
rest: add cache/list
Add GET cache/list request to obtain information about the client's cache. Resquest payload structure: { 'clients': ['10.141.10.21', '10.141.10.22'] } Response's structure: { 'clients': [ { 'ip': '10.141.10.21', 'cache_size': 2894572304857, 'images': [ {name:'img1', size: 87283902343, checksum: '5d4dcc677bc19f40a647d0002f4ade90'}, {name:'img2', size: 894572304857, checksum: '3eb22f888f88a55ad954f55644e1192e'} ] }, { 'ip': '10.141.10.22', 'cache_size': 49872839023434, 'images': [ {name:'img2', size: 894572304857, checksum: '3eb22f888f88a55ad954f55644e1192e'} ] } ] } Both 'cache_size' and the values in 'image_sizes' are provided as bytes. If a client has no cache partition the payload will include it as: ... { 'ip': '10.141.10.22', 'cache_size': 0, 'images': [] } ...
Diffstat (limited to 'src/rest.h')
-rw-r--r--src/rest.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rest.h b/src/rest.h
index e2e22ae..fbe0e43 100644
--- a/src/rest.h
+++ b/src/rest.h
@@ -116,6 +116,7 @@ enum og_rest_uri {
OG_URI_IMAGE_UPDATE,
OG_URI_IMAGE_RESTORE,
OG_URI_IMAGE_DELETE,
+ OG_URI_CACHE_LIST,
OG_URI_PART_SETUP,
OG_URI_RUN_SCHEDULE,
OG_URI_TASK_RUN,