ServerpodStartupIndicator class

Built-in health indicator that checks if Serverpod has completed startup.

This indicator is automatically added to the startup indicators and checks whether the server's start() method has completed. It provides a simple way to ensure the /startupz endpoint only returns healthy after the server is fully initialized.

When startup is complete, the observedValue contains the server's start time as a DateTime.

Inheritance

Constructors

ServerpodStartupIndicator(Serverpod _pod)
Creates a Serverpod startup indicator.

Properties

componentId String?
Unique identifier for the component instance.
no setterinherited
componentType String
Type of the component.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
name String
Human-readable name for this indicator.
no setteroverride
observedUnit String?
Unit of the observed value, e.g., ms, percent, bytes.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout Duration
Maximum time to wait for this check before considering it failed.
no setteroverride

Methods

check() Future<HealthCheckResult>
Perform the health check and return the result.
override
fail({DateTime? observedValue, String? output, DateTime? time}) HealthCheckResult
Creates a failing health check result for this indicator.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pass({DateTime? observedValue, String? output, DateTime? time}) HealthCheckResult
Creates a passing health check result for this indicator.
inherited
toString() String
A string representation of this object.
inherited

Operators

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