{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/roadrunner/_shared/latest--schema.json",
  "title": "roadrunner-beanstalk",
  "description": "The schema contains all the valid configuration parameters for the Beanstalk plugin for the roadrunner job system.",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/roadrunner-server/beanstalk/refs/heads/master/schema.json",
    "sourceSha256": "02d85b0424f63655f58d4e7c654b9e62b0af420c942e63d71613eddf2fccc6a7"
  },
  "$defs": {
    "pipeline": {
      "type": "object",
      "required": [
        "driver"
      ],
      "properties": {
        "driver": {
          "type": "string",
          "enum": [
            "beanstalk"
          ]
        },
        "config": {
          "type": "object",
          "description": "Configuration options for the Beanstalk pipeline.",
          "properties": {
            "priority": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/$defs/PipelineProperties/priority"
            },
            "prefetch": {
              "$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/$defs/PipelineProperties/prefetch"
            },
            "tube_priority": {
              "description": "Beanstalk internal tube priority",
              "type": "integer",
              "default": 1
            },
            "tube": {
              "description": "Tube name",
              "type": "string",
              "default": "default"
            },
            "reserve_timeout": {
              "description": "If no job is available before this timeout has passed, Reserve returns a ConnError recording ErrTimeout",
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/roadrunner/_shared/latest--3.0.schema.json#/$defs/Duration",
              "default": "5s"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "driver": {
      "type": "object",
      "properties": {
        "addr": {
          "title": "Beanstalk Server Address",
          "description": "The address of the Beanstalk server.",
          "type": "string",
          "default": "tcp://127.0.0.1:11300"
        },
        "timeout": {
          "title": "Connection Timeout",
          "description": "Connection timeout for the Beanstalk server.",
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/roadrunner/_shared/latest--3.0.schema.json#/$defs/Duration",
          "default": "30s"
        }
      },
      "description": "Configuration options for the Beanstalk driver.",
      "additionalProperties": false
    }
  }
}
