NodeCommand constructor
NodeCommand({
- required ArgResultsSource globals,
- required Map<
String, String> environment, - StringSink? out,
Creates the command.
Implementation
NodeCommand({
required this.globals,
required this.environment,
StringSink? out,
}) : out = out ?? stdout {
argParser
..addOption(
'hub',
help:
r'Hub control endpoint (ws:// or wss://…/_node). Defaults to '
r'$OMNYSTORE_HUB.',
)
..addOption('id', help: 'This node\'s id, unique within the hub.')
..addMultiOption(
'org',
abbr: 'o',
help:
'An organization this node serves, repeatable. A node may serve '
'several, and an organization may be served by several nodes.',
)
..addOption(
'token',
help:
r'Bearer token sent to the hub. Defaults to $OMNYSTORE_NODE_TOKEN.',
)
..addOption(
'public-url',
help:
'Publicly reachable base URL for this node. Set it when clients '
'can reach the node directly, so the hub redirects them instead of '
'relaying every byte.',
)
..addOption(
'priority',
help: 'Selection weight; higher wins when several nodes serve an org.',
defaultsTo: '0',
)
..addMultiOption(
'label',
help: 'Placement label key=value, repeatable (e.g. region=eu).',
)
..addOption('capacity', help: 'Total capacity in bytes.');
}