ServiceController class

Wraps dart_service_manager to install and manage OmnyServer's own Hub and Node agent as native OS services (systemd / launchd / Windows Service Manager), exposing the lifecycle in OmnyServer's domain terms.

This is the single integration point for "run as a system service" — the CLI's service command and the node's service-control handler both go through here, so platform specifics never leak into the core layers.

Constructors

ServiceController({DartServiceManager? manager, String packageName = 'omnyserver'})
Creates a controller over a dsm.DartServiceManager.

Properties

hashCode int
The hash code for this object.
no setterinherited
packageName String
The package name services are registered under (default omnyserver).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

describe(String serviceName) Future<ServiceDescriptor>
Returns the current status as an OmnyServer domain.ServiceDescriptor.
install(String serviceName, {bool startNow = true, String? path}) Future<void>
Installs the service named serviceName from this package, optionally starting it and configuring auto-start at boot.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restart(String serviceName) Future<void>
Restarts the service.
start(String serviceName) Future<void>
Starts the service.
stop(String serviceName) Future<void>
Stops the service.
toString() String
A string representation of this object.
inherited
uninstall(String serviceName) Future<void>
Uninstalls the service.

Operators

operator ==(Object other) bool
The equality operator.
inherited