1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

feat(realtime): collection for concurrent connections

This commit is contained in:
Torsten Dittmann 2021-06-11 15:30:33 +02:00
parent 2dcf3c2c19
commit c08b0a5d2b
2 changed files with 36 additions and 0 deletions

View file

@ -1698,6 +1698,39 @@ $collections = [
],
],
],
Database::SYSTEM_COLLECTION_REALTIME_CONNECTIONS => [
'$collection' => Database::SYSTEM_COLLECTION_COLLECTIONS,
'$id' => Database::SYSTEM_COLLECTION_REALTIME_CONNECTIONS,
'$permissions' => ['read' => ['*']],
'name' => 'Realtime Connections',
'structure' => true,
'rules' => [
[
'$collection' => Database::SYSTEM_COLLECTION_REALTIME_CONNECTIONS,
'label' => 'Container',
'key' => 'container',
'type' => Database::SYSTEM_VAR_TYPE_TEXT,
'required' => true,
'array' => false,
],
[
'$collection' => Database::SYSTEM_COLLECTION_REALTIME_CONNECTIONS,
'label' => 'Timestamp',
'key' => 'timestamp',
'type' => Database::SYSTEM_VAR_TYPE_NUMERIC,
'required' => true,
'array' => false,
],
[
'$collection' => Database::SYSTEM_COLLECTION_REALTIME_CONNECTIONS,
'label' => 'Data',
'key' => 'data',
'type' => Database::SYSTEM_VAR_TYPE_TEXT,
'required' => true,
'array' => false,
],
],
],
Database::SYSTEM_COLLECTION_RESERVED => [
'$collection' => Database::SYSTEM_COLLECTION_COLLECTIONS,
'$id' => Database::SYSTEM_COLLECTION_RESERVED,

View file

@ -41,6 +41,9 @@ class Database
const SYSTEM_COLLECTION_FUNCTIONS = 'functions';
const SYSTEM_COLLECTION_TAGS = 'tags';
const SYSTEM_COLLECTION_EXECUTIONS = 'executions';
// Realtime
const SYSTEM_COLLECTION_REALTIME_CONNECTIONS = 'realtimeConnections';
// Var Types
const SYSTEM_VAR_TYPE_TEXT = 'text';