Dart package skeleton for the F∆I gRPC client. Used by F∆I Studio (Tier-2) and Tier-3 domain apps (DigiScout / J∆I / Scout). Public surface — HubClient, HubEndpoint — is committed as a typed stub so downstream apps can compile against it immediately. Generated proto bindings land in a follow-up commit once the codegen step (planned: tools/generate.sh wrapping protoc-gen-dart against ../fai_platform/proto) is wired in. Future Forgejo path: fai/dart-sdk. dart analyze: clean. dart test: 4/4. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
20 lines
584 B
Dart
20 lines
584 B
Dart
// Example: connect to a locally-running F∆I hub.
|
|
//
|
|
// Run with `dart run example/fai_dart_sdk_example.dart`.
|
|
// Currently the SDK is a stub; once codegen lands, this example
|
|
// will exercise the actual Hub RPCs.
|
|
|
|
import 'package:fai_dart_sdk/fai_dart_sdk.dart';
|
|
|
|
Future<void> main() async {
|
|
final client = HubClient(
|
|
endpoint: const HubEndpoint(host: '127.0.0.1', port: 50051),
|
|
);
|
|
|
|
// ignore: avoid_print
|
|
print('would connect to ${client.endpoint}');
|
|
// ignore: avoid_print
|
|
print('(SDK is a stub today; live RPC arrives with codegen)');
|
|
|
|
await client.close();
|
|
}
|