-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b80998e
commit e283033
Showing
74 changed files
with
2,773 additions
and
1,144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import 'dart:async'; | ||
|
||
import 'package:nitric_sdk/src/api/api.dart'; | ||
import 'package:nitric_sdk/src/grpc_helper.dart'; | ||
import 'package:nitric_sdk/src/nitric/proto/batch/v1/batch.pb.dart'; | ||
import 'package:nitric_sdk/src/nitric/proto/batch/v1/batch.pbgrpc.dart' as $p; | ||
|
||
class Job { | ||
String name; | ||
|
||
Job(this.name); | ||
|
||
Future<void> submit(Map<String, dynamic> message) async { | ||
final data = JobData(struct: Proto.structFromMap(message)); | ||
|
||
final req = $p.JobSubmitRequest(data: data, jobName: name); | ||
|
||
await ClientChannelSingleton.useClient($p.BatchClient.new, (client) async { | ||
await client.submitJob(req); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.