Add --type option for services across all 42 implementations
Support service_type for SRV records (minecraft, mumble, teamspeak, source, tcp, udp). Each implementation now parses --type and sends service_type in the JSON payload.
This commit is contained in:
parent
564e9e7075
commit
eb5d4ca8bf
42 changed files with 783 additions and 104 deletions
8
un.dart
8
un.dart
|
|
@ -82,6 +82,7 @@ class Args {
|
|||
bool serviceList = false;
|
||||
String? serviceName;
|
||||
String? servicePorts;
|
||||
String? serviceType;
|
||||
String? serviceBootstrap;
|
||||
String? serviceInfo;
|
||||
String? serviceLogs;
|
||||
|
|
@ -321,6 +322,9 @@ Future<void> cmdService(Args args) async {
|
|||
if (args.servicePorts != null) {
|
||||
payload['ports'] = args.servicePorts!.split(',').map((p) => int.parse(p.trim())).toList();
|
||||
}
|
||||
if (args.serviceType != null) {
|
||||
payload['service_type'] = args.serviceType;
|
||||
}
|
||||
if (args.serviceBootstrap != null) {
|
||||
payload['bootstrap'] = args.serviceBootstrap;
|
||||
}
|
||||
|
|
@ -404,6 +408,9 @@ Args parseArgs(List<String> argv) {
|
|||
case '--ports':
|
||||
args.servicePorts = argv[++i];
|
||||
break;
|
||||
case '--type':
|
||||
args.serviceType = argv[++i];
|
||||
break;
|
||||
case '--bootstrap':
|
||||
args.serviceBootstrap = argv[++i];
|
||||
break;
|
||||
|
|
@ -459,6 +466,7 @@ Service options:
|
|||
--list List services
|
||||
--name NAME Service name
|
||||
--ports PORTS Comma-separated ports
|
||||
--type TYPE Service type (minecraft/mumble/teamspeak/source/tcp/udp)
|
||||
--bootstrap CMD Bootstrap command
|
||||
--info ID Get service details
|
||||
--logs ID Get all logs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue