feat(gateway): report provider lifecycle
Verify Data Plane / gateway (push) Successful in 2m11s

This commit is contained in:
sechmachine
2026-07-29 10:55:19 +07:00
parent 61a17ff42b
commit 8a302cd8cc
7 changed files with 99 additions and 21 deletions
+9
View File
@@ -76,6 +76,15 @@ func (c *ControlPlaneClient) Release(ctx context.Context, authority protocol.Ses
return err
}
func (c *ControlPlaneClient) ReportProviderState(ctx context.Context, state protocol.ProviderState) error {
payload, err := protocol.EncodeProviderState(state)
if err != nil {
return err
}
_, err = c.post(ctx, "/api/v1/gateway/provider-state", payload)
return err
}
func (c *ControlPlaneClient) post(ctx context.Context, path string, payload []byte) ([]byte, error) {
if c == nil || c.HTTPClient == nil || c.BaseURL == "" {
return nil, errors.New("control-plane client is not configured")