{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "description": "Executa",
    "$comment": "",
    "properties": {
        "debug": {
            "description": "Display debug log data?",
            "type": "boolean",
            "default": false
        },
        "stdio": {
            "description": "Start a `stdio` server.",
            "type": "boolean",
            "default": false
        },
        "vsock": {
            "description": "Start a `vsock` server.",
            "$comment": "If a `number`, it will be used as the port number.\nIf `true`, the default Vsock port `6000` will be used.",
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "number"
                }
            ],
            "default": false
        },
        "tcp": {
            "description": "Start a TCP server.",
            "$comment": "If a `string`, it will be parsed and used as the address\nof the TCP server.\nIf `true`, the default TCP address `tcp://127.0.0.1:7000`\nwill be used.",
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "string",
                    "pattern": "^((tcp?://)?([^:/]+)(:(d+))?(/(.+))?)|(d+)$"
                }
            ],
            "default": false
        },
        "http": {
            "description": "Start a HTTP server.",
            "$comment": "If a `string`, it will be parsed and used as the address\nof the HTTP server.\nIf `true`, the default HTTP address `http://127.0.0.1:8000`\nwill be used.",
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "string",
                    "pattern": "^((https?://)?([^:/]+)(:(d+))?(/(.+))?)|(d+)$"
                }
            ],
            "default": false
        },
        "ws": {
            "description": "Start a WebSocket server.",
            "$comment": "If a `string`, it will be parsed and used as the address\nof the WebSocket server.\nIf `true`, the default WebSocket address `ws://127.0.0.1:9000`\nwill be used.",
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "string",
                    "pattern": "^((wss?://)?([^:/]+)(:(d+))?(/(.+))?)|(d+)$"
                }
            ],
            "default": false
        },
        "timeout": {
            "description": "Duration of inactivity after which the process should stop.",
            "$comment": "Seconds. Zero means no timeout.",
            "type": "number",
            "default": 0
        },
        "timelimit": {
            "description": "Maximum duration for the process.",
            "$comment": "Seconds. Zero means no time limit.",
            "type": "number",
            "default": 0
        },
        "peers": {
            "description": "List of peer addresses.",
            "$comment": "Each string in this list is parsed as an address to\na peer executor. e.g. `https://123.45.67.89/`, `docker://image`",
            "type": "array",
            "items": {
                "type": "string"
            },
            "default": [
                "stdio://*"
            ]
        },
        "queueLength": {
            "description": "Maximum length of the request queue.",
            "$comment": "When queue reaches this length, subsequent requests will\nfail with an error response to client.",
            "type": "number",
            "minimum": 0,
            "default": 1000
        },
        "queueInterval": {
            "description": "Interval between attempts to reduce request queue.",
            "$comment": "Seconds.",
            "type": "number",
            "exclusiveMinimum": 0,
            "default": 1
        },
        "queueStale": {
            "description": "Duration after which a request is removed from queue.",
            "$comment": "Seconds. Client will be notified when a request is removed.",
            "type": "number",
            "exclusiveMinimum": 0,
            "default": 3600
        }
    }
}
