feat(agent): partially wrote daemon code

This commit is contained in:
Jef Roosens 2022-12-12 22:09:57 +01:00 committed by Chewing_Bever
parent 7ef8d4b846
commit 6f23d690a7
Signed by untrusted user: Jef Roosens
GPG key ID: B75D4F293C7052DB
6 changed files with 116 additions and 13 deletions

11
src/client/jobs.v Normal file
View file

@ -0,0 +1,11 @@
module client
import build { BuildConfig }
pub fn (c &Client) poll_jobs(max int) ![]BuildConfig {
data := c.send_request<[]BuildConfig>(.get, '/api/v1/jobs/poll', {
'max': max.str()
})!
return data.data
}