feat: declareService — persist a host service via the new RPC
Some checks failed
Security / Security check (push) Failing after 1s
Some checks failed
Security / Security check (push) Failing after 1s
Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
a0c5725578
commit
70f04af438
5 changed files with 233 additions and 0 deletions
|
|
@ -622,6 +622,15 @@ class HubAdminClient extends $grpc.Client {
|
|||
return $createUnaryCall(_$listServices, request, options: options);
|
||||
}
|
||||
|
||||
/// Declare a new host service in the operator config. Fails with
|
||||
/// ALREADY_EXISTS when a service of that name is configured.
|
||||
$grpc.ResponseFuture<$0.DeclareServiceResponse> declareService(
|
||||
$0.DeclareServiceRequest request, {
|
||||
$grpc.CallOptions? options,
|
||||
}) {
|
||||
return $createUnaryCall(_$declareService, request, options: options);
|
||||
}
|
||||
|
||||
/// Compare the running hub's version against the channel release
|
||||
/// manifest. Surfaced by the CLI as `chain update check` and by
|
||||
/// Studio's Doctor page as a "v0.x.y available" pill. Network
|
||||
|
|
@ -1021,6 +1030,11 @@ class HubAdminClient extends $grpc.Client {
|
|||
'/chain.v1.HubAdmin/ListServices',
|
||||
($1.Empty value) => value.writeToBuffer(),
|
||||
$0.ServiceList.fromBuffer);
|
||||
static final _$declareService =
|
||||
$grpc.ClientMethod<$0.DeclareServiceRequest, $0.DeclareServiceResponse>(
|
||||
'/chain.v1.HubAdmin/DeclareService',
|
||||
($0.DeclareServiceRequest value) => value.writeToBuffer(),
|
||||
$0.DeclareServiceResponse.fromBuffer);
|
||||
static final _$checkUpdate =
|
||||
$grpc.ClientMethod<$1.Empty, $0.CheckUpdateResponse>(
|
||||
'/chain.v1.HubAdmin/CheckUpdate',
|
||||
|
|
@ -1393,6 +1407,15 @@ abstract class HubAdminServiceBase extends $grpc.Service {
|
|||
false,
|
||||
($core.List<$core.int> value) => $1.Empty.fromBuffer(value),
|
||||
($0.ServiceList value) => value.writeToBuffer()));
|
||||
$addMethod($grpc.ServiceMethod<$0.DeclareServiceRequest,
|
||||
$0.DeclareServiceResponse>(
|
||||
'DeclareService',
|
||||
declareService_Pre,
|
||||
false,
|
||||
false,
|
||||
($core.List<$core.int> value) =>
|
||||
$0.DeclareServiceRequest.fromBuffer(value),
|
||||
($0.DeclareServiceResponse value) => value.writeToBuffer()));
|
||||
$addMethod($grpc.ServiceMethod<$1.Empty, $0.CheckUpdateResponse>(
|
||||
'CheckUpdate',
|
||||
checkUpdate_Pre,
|
||||
|
|
@ -1842,6 +1865,15 @@ abstract class HubAdminServiceBase extends $grpc.Service {
|
|||
$async.Future<$0.ServiceList> listServices(
|
||||
$grpc.ServiceCall call, $1.Empty request);
|
||||
|
||||
$async.Future<$0.DeclareServiceResponse> declareService_Pre(
|
||||
$grpc.ServiceCall $call,
|
||||
$async.Future<$0.DeclareServiceRequest> $request) async {
|
||||
return declareService($call, await $request);
|
||||
}
|
||||
|
||||
$async.Future<$0.DeclareServiceResponse> declareService(
|
||||
$grpc.ServiceCall call, $0.DeclareServiceRequest request);
|
||||
|
||||
$async.Future<$0.CheckUpdateResponse> checkUpdate_Pre(
|
||||
$grpc.ServiceCall $call, $async.Future<$1.Empty> $request) async {
|
||||
return checkUpdate($call, await $request);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue