feat(agent): initial working version

This commit is contained in:
Jef Roosens 2022-12-12 22:58:43 +01:00 committed by Chewing_Bever
parent 6f23d690a7
commit 3611123f45
Signed by untrusted user: Jef Roosens
GPG key ID: B75D4F293C7052DB
7 changed files with 47 additions and 24 deletions

View file

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