github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/internal/fs/schemas/choria/protocol/v2/transport.json (about)

     1  {
     2    "$schema": "http://json-schema.org/draft-07/schema#",
     3    "$id": "https://choria.io/schemas/choria/protocol/v2/transport.json",
     4    "description": "Choria Transport version 2",
     5    "title": "TransportV2",
     6    "type":"object",
     7    "required":[
     8      "protocol",
     9      "data",
    10      "headers"
    11    ],
    12    "properties": {
    13      "protocol": {
    14        "type":"string",
    15        "const": "io.choria.protocol.v2.transport"
    16      },
    17      "data": {
    18        "type":"string",
    19        "description": "Base64 encoded JSON representation of the SecureRequestV2 or SecureReplyV2"
    20      },
    21      "headers": {
    22        "type":"object",
    23        "properties": {
    24          "reply": {
    25            "type":"string",
    26            "description": "A transport specific response channel for this message, used in requests"
    27          },
    28          "sender": {
    29            "type":"string",
    30            "description": "The configured identity of the sender",
    31            "minLength": 1
    32          },
    33          "seen-by": {
    34            "type":"array",
    35            "description": "Tracks nodes this message travelled through",
    36            "items": [
    37              {
    38                "type":"array",
    39                "description": "Triplet of from, via and to",
    40                "items": [
    41                  {
    42                    "type":"string",
    43                    "description": "The incoming end point - typically a NATS server name. Blank string if this is where a message starts like a request"
    44                  },
    45                  {
    46                    "type":"string",
    47                    "description": "The processing node - the identity of a server, client or broker processing this message"
    48                  },
    49                  {
    50                    "type":"string",
    51                    "description": "The outgoing end point - typically a NATS server name. Blank string if this is where the message ends like a client receiving a reply"
    52                  }
    53                ]
    54              }
    55            ]
    56          },
    57          "federation": {
    58            "description": "Optional headers set to support Federation.",
    59            "type":"object",
    60            "required":[
    61              "request"
    62            ],
    63            "properties": {
    64              "request": {
    65                "type":"string",
    66                "description": "The request ID of the contained Secure Request or Secure Reply.  Used for logging mainly",
    67                "minLength": 1
    68              },
    69              "reply": {
    70                "type":"string",
    71                "description": "Used by Federation to record the original reply header"
    72              },
    73              "targets": {
    74                "type":"array",
    75                "description": "List of targets the message should be sent to, these are Choria identities",
    76                "items": {
    77                  "type":"string",
    78                  "description": "Node identities this message should be dispatched to"
    79                }
    80              }
    81            }
    82          }
    83        }
    84      }
    85    }
    86  }