From cfa43b3c0a960165a624e3847216d1e4dd60f49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Leszko?= Date: Thu, 28 Mar 2024 12:48:10 +0100 Subject: [PATCH] Add host to LockPull (#62) --- api.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api.go b/api.go index bec7cb5..1bfc6c7 100644 --- a/api.go +++ b/api.go @@ -910,13 +910,14 @@ func (lapi *Client) Heartbeat(id string) error { } // LockPull locks the stream pull -func (lapi *Client) LockPull(id string, leaseTimeoutMs time.Duration) error { +func (lapi *Client) LockPull(id string, leaseTimeoutMs time.Duration, host string) error { if id == "" { return errors.New("empty id") } payload := map[string]interface{}{ "leaseTimeout": leaseTimeoutMs, + "host": host, } u := fmt.Sprintf("%s/api/stream/%s/lockPull", lapi.chosenServer, id) err := lapi.doRequest("POST", u, "stream", "lock_pull", payload, nil)