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

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