feat: HubClient.verifyEventChain + listServices
Mirrors the two new HubAdmin RPCs in fai_platform 0.10.44. Studio's Doctor page consumes these directly. Generated proto bindings refreshed to include VerifyEventChainResponse, ServiceList, DeclaredService. Bumps fai_dart_sdk 0.2.0 -> 0.3.0. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
da10820959
commit
1eaa36b1a0
4 changed files with 303 additions and 0 deletions
|
|
@ -38,6 +38,8 @@ typedef CapabilityEntry = pb.CapabilityEntry;
|
|||
typedef CapabilityList = pb.CapabilityList;
|
||||
typedef LoggedEvent = pb.LoggedEvent;
|
||||
typedef PendingApprovalEntry = pb.PendingApprovalEntry;
|
||||
typedef DeclaredService = pb.DeclaredService;
|
||||
typedef VerifyEventChainResponse = pb.VerifyEventChainResponse;
|
||||
|
||||
/// Typed client for the F∆I Hub gRPC surface. Construct once,
|
||||
/// reuse for the process lifetime, call [close] on shutdown.
|
||||
|
|
@ -150,6 +152,20 @@ class HubClient {
|
|||
await _admin.decideApproval(req);
|
||||
}
|
||||
|
||||
/// Walk the event-log hash chain on the hub. Returns total /
|
||||
/// verified counts and an `tamperedAt` id (empty when clean).
|
||||
Future<VerifyEventChainResponse> verifyEventChain() {
|
||||
return _admin.verifyEventChain(Empty());
|
||||
}
|
||||
|
||||
/// Host services declared in the operator config. Each entry
|
||||
/// is a name + endpoint + tags; reachability is up to the
|
||||
/// caller (typically a follow-up HTTP probe).
|
||||
Future<List<DeclaredService>> listServices() async {
|
||||
final r = await _admin.listServices(Empty());
|
||||
return r.services;
|
||||
}
|
||||
|
||||
/// Closes the gRPC channel. Idempotent.
|
||||
Future<void> close() async {
|
||||
await _channel.shutdown();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue