diff options
author | Scott Murray <scott.murray@konsulko.com> | 2023-09-24 12:45:03 -0400 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2023-09-24 12:55:47 -0400 |
commit | 80a4f8d75a66c22a23e825d4c0fb4065e2e58cb8 (patch) | |
tree | 07751588fbd9f0a5cecceabe593a716f01facbac /lib/generated/kuksa/val/v1/val.pbgrpc.dart | |
parent | 9bc83e64c508ad8c69a3950d5421774f9b53a31f (diff) |
Rework to use KUKSA.val databroker gRPC API
Rework to move from the WebSocket API with the older KUKSA.val
server to the gRPC "VAL" API of the databroker.
Changes include:
- All VISS WebSocket API code has been removed, and the signal
providers replumbed to be driven by a new VssClient class with
a dashboard-specific child class to hold all the gRPC API
handling.
- The generated code for the VAL API and its dependencies has
been checked in under lib/generated, as there still does not
seem to be a good way to generate it during the Flutter build.
- The "flutter-" prefix has been dropped from the configuration
file name (i.e. it's now just "cluster-dashboard.yaml") to match
the naming used for the other Flutter applications. The
authorization token field name has been renamed to "authorization",
and there are new "use-tls" and "ca-certificate" configuration
fields. TLS is disabled by default for now, and the default CA
certificate is /etc/kuksa.val/CA.pem.
- Bumped minimum SDK version to 2.18 in pubspec.yaml to enable
"super" keyword support. This matches what the version was set
to in the other applications.
- The unused navigation support has been removed to simplify
maintenance, as it is more likely that it will be replaced with
something else in the future than fixed to be usable.
- Removed .dart_tool generated output that had been checked in,
and added .gitignore file from flutter-homescreen so that things
will hopefully stay clean in the future. Since pubspec.lock is
not checked in here, it has also been added to .gitignore.
Bug-AGL: SPEC-4762
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Id35c569cdbb8476a527717ece7b4bb369c4874b7
Diffstat (limited to 'lib/generated/kuksa/val/v1/val.pbgrpc.dart')
-rw-r--r-- | lib/generated/kuksa/val/v1/val.pbgrpc.dart | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/lib/generated/kuksa/val/v1/val.pbgrpc.dart b/lib/generated/kuksa/val/v1/val.pbgrpc.dart new file mode 100644 index 0000000..3a9a3c8 --- /dev/null +++ b/lib/generated/kuksa/val/v1/val.pbgrpc.dart @@ -0,0 +1,133 @@ +/// +// Generated code. Do not modify. +// source: kuksa/val/v1/val.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; + +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'val.pb.dart' as $0; +export 'val.pb.dart'; + +class VALClient extends $grpc.Client { + static final _$get = $grpc.ClientMethod<$0.GetRequest, $0.GetResponse>( + '/kuksa.val.v1.VAL/Get', + ($0.GetRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.GetResponse.fromBuffer(value)); + static final _$set = $grpc.ClientMethod<$0.SetRequest, $0.SetResponse>( + '/kuksa.val.v1.VAL/Set', + ($0.SetRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.SetResponse.fromBuffer(value)); + static final _$subscribe = + $grpc.ClientMethod<$0.SubscribeRequest, $0.SubscribeResponse>( + '/kuksa.val.v1.VAL/Subscribe', + ($0.SubscribeRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.SubscribeResponse.fromBuffer(value)); + static final _$getServerInfo = + $grpc.ClientMethod<$0.GetServerInfoRequest, $0.GetServerInfoResponse>( + '/kuksa.val.v1.VAL/GetServerInfo', + ($0.GetServerInfoRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetServerInfoResponse.fromBuffer(value)); + + VALClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, interceptors: interceptors); + + $grpc.ResponseFuture<$0.GetResponse> get($0.GetRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$get, request, options: options); + } + + $grpc.ResponseFuture<$0.SetResponse> set($0.SetRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$set, request, options: options); + } + + $grpc.ResponseStream<$0.SubscribeResponse> subscribe( + $0.SubscribeRequest request, + {$grpc.CallOptions? options}) { + return $createStreamingCall( + _$subscribe, $async.Stream.fromIterable([request]), + options: options); + } + + $grpc.ResponseFuture<$0.GetServerInfoResponse> getServerInfo( + $0.GetServerInfoRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getServerInfo, request, options: options); + } +} + +abstract class VALServiceBase extends $grpc.Service { + $core.String get $name => 'kuksa.val.v1.VAL'; + + VALServiceBase() { + $addMethod($grpc.ServiceMethod<$0.GetRequest, $0.GetResponse>( + 'Get', + get_Pre, + false, + false, + ($core.List<$core.int> value) => $0.GetRequest.fromBuffer(value), + ($0.GetResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SetRequest, $0.SetResponse>( + 'Set', + set_Pre, + false, + false, + ($core.List<$core.int> value) => $0.SetRequest.fromBuffer(value), + ($0.SetResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SubscribeRequest, $0.SubscribeResponse>( + 'Subscribe', + subscribe_Pre, + false, + true, + ($core.List<$core.int> value) => $0.SubscribeRequest.fromBuffer(value), + ($0.SubscribeResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.GetServerInfoRequest, $0.GetServerInfoResponse>( + 'GetServerInfo', + getServerInfo_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetServerInfoRequest.fromBuffer(value), + ($0.GetServerInfoResponse value) => value.writeToBuffer())); + } + + $async.Future<$0.GetResponse> get_Pre( + $grpc.ServiceCall call, $async.Future<$0.GetRequest> request) async { + return get(call, await request); + } + + $async.Future<$0.SetResponse> set_Pre( + $grpc.ServiceCall call, $async.Future<$0.SetRequest> request) async { + return set(call, await request); + } + + $async.Stream<$0.SubscribeResponse> subscribe_Pre($grpc.ServiceCall call, + $async.Future<$0.SubscribeRequest> request) async* { + yield* subscribe(call, await request); + } + + $async.Future<$0.GetServerInfoResponse> getServerInfo_Pre( + $grpc.ServiceCall call, + $async.Future<$0.GetServerInfoRequest> request) async { + return getServerInfo(call, await request); + } + + $async.Future<$0.GetResponse> get( + $grpc.ServiceCall call, $0.GetRequest request); + $async.Future<$0.SetResponse> set( + $grpc.ServiceCall call, $0.SetRequest request); + $async.Stream<$0.SubscribeResponse> subscribe( + $grpc.ServiceCall call, $0.SubscribeRequest request); + $async.Future<$0.GetServerInfoResponse> getServerInfo( + $grpc.ServiceCall call, $0.GetServerInfoRequest request); +} |