EndpointInsights class Endpoint

The InsightsEndpoint provides a way to access real time information from the running server or to change settings.

Constructors

EndpointInsights(EndpointCaller caller)

Properties

caller → EndpointCaller
Holds a reference to the caller class.
finalinherited
client ↔ ServerpodClientShared
Reference to the client.
latefinalinherited
hashCode int
The hash code for this object.
no setterinherited
name String
The name of the endpoint this reference is connected to.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<SerializableEntity>
Stream of messages sent from an endpoint that supports streaming.
no setterinherited

Methods

checkHealth() Future<ServerHealthResult>
Performs a health check on the running ServerPod.
clearAllLogs() Future<void>
Clear all server logs.
executeSql(String sql) Future<int>
Executes SQL commands. Returns the number of rows affected.
fetchDatabaseBulkData({required String table, required int startingId, required int limit, Filter? filter}) Future<BulkData>
Exports raw data serialized in JSON from the database.
fetchFile(String path) Future<String>
Fetches a file from the server. Only whitelisted files in Serverpod.filesWhitelistedForInsights can be fetched. The file path must be in unix format and relative to the servers root directory.
getCachesInfo(bool fetchKeys) Future<CachesInfo>
Retrieve information about the state of the caches on this server.
getDatabaseDefinitions() Future<DatabaseDefinitions>
Returns the target and live database definitions. See getTargetTableDefinition and getLiveDatabaseDefinition for more details.
getDatabaseRowCount({required String table}) Future<int>
Returns the approximate number of rows in the provided table.
getHealthData(DateTime start, DateTime end) Future<ServerHealthResult>
Gets historical health check data. Returns data for the whole cluster.
getLiveDatabaseDefinition() Future<DatabaseDefinition>
Returns the structure of the live database by extracting it using SQL.
getOpenSessionLog(int? numEntries, SessionLogFilter? filter) Future<SessionLogResult>
Get the latest numEntries from the session log.
getRuntimeSettings() Future<RuntimeSettings>
Get the current RuntimeSettings from the running Server.
getSessionLog(int? numEntries, SessionLogFilter? filter) Future<SessionLogResult>
Get the latest numEntries from the session log.
getTargetTableDefinition() Future<List<TableDefinition>>
Returns the target structure of the database defined in the yaml files of the protocol folder. This includes the developers project, all used modules and the main serverpod package.
hotReload() Future<bool>
Performs a hot reload of the server.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetStream() → void
Resets web socket stream, so it's possible to re-listen to endpoint streams.
inherited
runQueries(List<String> queries) Future<BulkQueryResult>
Executes a list of queries on the database and returns the last result. The queries are executed in a single transaction.
sendStreamMessage(SerializableEntity message) Future<void>
Sends a message to the endpoint's stream.
inherited
setRuntimeSettings(RuntimeSettings runtimeSettings) Future<void>
Update the current RuntimeSettings in the running Server.
shutdown() Future<void>
Safely shuts down this ServerPod.
toString() String
A string representation of this object.
inherited

Operators

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