Etcd · Schema

TxnRequest

An atomic compare-and-swap transaction consisting of conditions, success operations, and failure operations

Cloud NativeConsensusDistributed SystemsGraduatedKey-Value StoreKubernetes

Properties

Name Type Description
compare array Conditions that must all be true for the success branch to execute
success array Operations to execute when all compare conditions are true
failure array Operations to execute when any compare condition is false
View JSON Schema on GitHub

JSON Schema

etcd-txnrequest-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/TxnRequest",
  "title": "TxnRequest",
  "type": "object",
  "description": "An atomic compare-and-swap transaction consisting of conditions, success operations, and failure operations",
  "properties": {
    "compare": {
      "type": "array",
      "description": "Conditions that must all be true for the success branch to execute",
      "items": {
        "$ref": "#/components/schemas/Compare"
      }
    },
    "success": {
      "type": "array",
      "description": "Operations to execute when all compare conditions are true",
      "items": {
        "$ref": "#/components/schemas/RequestOp"
      }
    },
    "failure": {
      "type": "array",
      "description": "Operations to execute when any compare condition is false",
      "items": {
        "$ref": "#/components/schemas/RequestOp"
      }
    }
  }
}