summaryrefslogtreecommitdiffstats
path: root/src/utils.c
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/utils.c
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/utils.c')
0 files changed, 0 insertions, 0 deletions