Unregister stateless agents from server on termination (#2606)

Closes #2027

---------

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Thomas Anderson
2023-11-02 02:53:47 +03:00
committed by GitHub
parent ec62a1d0c6
commit 3620c84da4
14 changed files with 157 additions and 61 deletions

View File

@@ -366,6 +366,11 @@ func (c *client) RegisterAgent(ctx context.Context, platform, backend, version s
return res.GetAgentId(), err
}
func (c *client) UnregisterAgent(ctx context.Context) error {
_, err := c.client.UnregisterAgent(ctx, &proto.Empty{})
return err
}
func (c *client) ReportHealth(ctx context.Context) (err error) {
retry := c.newBackOff()
req := new(proto.ReportHealthRequest)