ServerHealth class

Server health information

Annotations
  • @immutable

Constructors

ServerHealth({String status = 'healthy', String? version, int connections = 0, required bool isRunning, required int connectedSessions, required int registeredTools, required int registeredResources, required int registeredPrompts, required DateTime startTime, required Duration uptime, required Map<String, dynamic> metrics})
const
ServerHealth.fromJson(Map<String, dynamic> json)
factory

Properties

connectedSessions int
Number of connected client sessions
final
connections int
Number of active connections
final
hashCode int
The hash code for this object.
no setterinherited
isRunning bool
Whether the server is running
final
metrics Map<String, dynamic>
Detailed performance metrics
final
registeredPrompts int
Number of registered prompts
final
registeredResources int
Number of registered resources
final
registeredTools int
Number of registered tools
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startTime DateTime
When the server started
final
status String
Health status (e.g., 'healthy', 'degraded', 'unhealthy')
final
uptime Duration
How long the server has been running
final
version String?
Server version
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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