QueryGateway static method

Future<GatewayInfo> QueryGateway(
  1. GatewayInfo gatewayInfo
)

Implementation

static Future<GatewayInfo> QueryGateway(GatewayInfo gatewayInfo) async {
  String jwt = await getJWT();
  final channel = await Channel.getDefaultIoTManagerChannel();
  final stub = GatewayManagerClient(channel,
      options: CallOptions(metadata: {'jwt': jwt}));
  GatewayInfo newGatewayInfo = await stub.queryGateway(gatewayInfo);
  print('RegisterUserWithUserInfo: ${newGatewayInfo}');
  channel.shutdown();
  return newGatewayInfo;
}