feat(clients): registry: Agent Registry, Agent Gateway, Agent Identity from discovery call table
86-row call table checked against Google discovery documents, typed services, local approval ledger, live read-only tests, /agent/registry demo. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
// Shared by the registry, gateway and policy services: finish a mutation's
|
||||
// long-running operation, and the read-before-mutate existence probe.
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
#include "google/operation.h"
|
||||
|
||||
namespace molo::google::registry {
|
||||
|
||||
class OperationRunner {
|
||||
public:
|
||||
// Takes the reply of a create/patch/delete call. Returns {"operation":name}
|
||||
// once done; polls through wait_operation (capped) when not yet done.
|
||||
static clients::body::Json finish(GoogleClient& client, const ServiceEndpoint& endpoint,
|
||||
const clients::body::Json& reply,
|
||||
const Sleeper& sleeper);
|
||||
|
||||
// True when `probe` returns, false on HTTP 404, rethrows anything else.
|
||||
static bool exists(const std::function<clients::body::Json()>& probe);
|
||||
};
|
||||
|
||||
} // namespace molo::google::registry
|
||||
Reference in New Issue
Block a user