Files
P42_godDaemons/configSchema.json
T

219 lines
7.6 KiB
JSON

{
"$id": "https://nicsys.eu/god-daemons-config.schema.json",
"title": "P42 God Daemons Configuration",
"description": "Shared configuration for P42 God Daemons",
"type": "object",
"definitions": {
"redisConnection": {
"type": "object",
"properties": {
"redisId": { "type": "string" },
"role": { "type": "string", "enum": ["primary", "shard"] },
"host": { "type": "string" },
"tls": { "type": "boolean" },
"port": { "type": "integer" },
"user": { "type": "string" },
"pass": { "type": "string" },
"chansNamespace": { "type": "string" },
"basePrefix": { "type": "string" }
},
"required": [
"redisId",
"chansNamespace",
"basePrefix"
]
},
"redisArray": {
"type": "array",
"items": { "$ref": "#/definitions/redisConnection" },
"minItems": 1
}
},
"properties": {
"accessRights": {
"type": "array",
"items": {
"type": "object",
"properties": {
"roles": {
"type": [
"string",
"array"
],
"items": {
"type": "string"
}
},
"canDo": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"roles",
"canDo"
]
}
},
"gps": {
"type": "object",
"properties": {
"primordialDaemon": { "type": "boolean" },
"ActionsChannel": { "type": "string" },
"ActionsReply": { "type": "string" },
"arenaActionsChannel": { "type": "string" },
"arenaActionsReply": { "type": "string" },
"GPSstorage": {
"type": "object",
"properties": {
"agentHashKey": { "type": "string" },
"agentsIndexKey": { "type": "string" },
"positionsStream": { "type": "string" },
"streamMaxLen": { "type": "integer", "minimum": 0 }
},
"required": [
"agentHashKey",
"agentsIndexKey",
"positionsStream"
]
},
"agentVectorChangeChannel": { "type": "string" },
"collisionsChannel": { "type": "string" },
"lifecycle": {
"type": "object",
"properties": {
"arenaChannel": { "type": "string" },
"godsReadyChannel": { "type": "string" }
},
"required": [
"arenaChannel",
"godsReadyChannel"
]
},
"arenaStorage": {
"type": "object",
"properties": {
"agentHashKey": { "type": "string" },
"agentsIndexKey": { "type": "string" }
},
"required": [
"agentHashKey",
"agentsIndexKey"
]
},
"senderId": { "type": "string" },
"nearMissDistance": { "type": "number", "minimum": 0 },
"prismTimeHeight": { "type": "number", "minimum": 0 },
"collisionTickMs": { "type": "integer", "minimum": 1 },
"prismRefreshLeadSeconds": { "type": "number", "minimum": 0 }
},
"required": [
"ActionsChannel",
"ActionsReply",
"arenaActionsChannel",
"arenaActionsReply",
"GPSstorage",
"agentVectorChangeChannel",
"collisionsChannel"
]
},
"maestro": {
"type": "object",
"properties": {
"ActionsChannel": { "type": "string" },
"ActionsReply": { "type": "string" },
"arenaActionsChannel": { "type": "string" },
"arenaActionsReply": { "type": "string" },
"senderId": { "type": "string" },
"lifecycle": {
"type": "object",
"properties": {
"arenaChannel": { "type": "string" },
"godsReadyChannel": { "type": "string" }
},
"required": [
"arenaChannel",
"godsReadyChannel"
]
},
"readyTimeoutMs": { "type": "integer", "minimum": 1000 }
},
"required": [
"ActionsChannel",
"ActionsReply",
"arenaActionsChannel",
"arenaActionsReply"
]
},
"mysql": {
"type": "object",
"properties": {
"socketPath": { "type": "string" },
"host": { "type": "string" },
"port": { "type": "integer" },
"guiDatabase": { "type": "string" },
"simDatabase": { "type": "string" },
"connectionLimit": { "type": "integer", "minimum": 1 }
},
"required": []
},
"observer": {
"type": "object",
"properties": {
"primordialDaemon": { "type": "boolean" },
"ActionsChannel": { "type": "string" },
"ActionsReply": { "type": "string" },
"arenaActionsChannel": { "type": "string" },
"arenaActionsReply": { "type": "string" },
"FrustumEventsChannel": { "type": "string" },
"senderId": { "type": "string" },
"scanIntervalMs": { "type": "integer", "minimum": 50 },
"lifecycle": {
"type": "object",
"properties": {
"arenaChannel": { "type": "string" },
"godsReadyChannel": { "type": "string" }
},
"required": [
"arenaChannel",
"godsReadyChannel"
]
}
},
"required": [
"ActionsChannel",
"ActionsReply",
"FrustumEventsChannel",
"arenaActionsChannel",
"arenaActionsReply"
]
},
"systemMesh": {
"type": "object",
"properties": {
"redis": { "$ref": "#/definitions/redisArray" }
},
"required": [
"redis"
]
},
"arenaMesh": {
"type": "object",
"properties": {
"redis": { "$ref": "#/definitions/redisArray" }
},
"required": [
"redis"
]
}
},
"required": [
"accessRights",
"systemMesh",
"arenaMesh"
],
"additionalProperties": true
}