{
  "repo": "tidbcloud/eventrouter",
  "binary": "eventrouter",
  "binary_path": "main.go",
  "dependencies": {
    "HTTP GET /metrics": {
      "infrastructure": {},
      "services": []
    },
    "Runtime KubernetesEventWatcher.WatchEvents": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Shared informer LIST/WATCH on core/v1 Events",
              "trigger": "Consume cluster event stream",
              "implementation": "informers.NewSharedInformerFactory(clientset, ...).Core().V1().Events()"
            }
          ]
        },
        "prometheus": {
          "conditions": [
            "enable-prometheus"
          ],
          "operations": [
            {
              "operation": "Counter increments",
              "trigger": "Record event type counters",
              "implementation": "prometheusEvent(e)"
            }
          ]
        }
      },
      "services": [
        {
          "name": "configured-sink",
          "target_interface": "glog|stdout|http|kafka|s3sink|influxdb|rockset|eventhub",
          "operation_type": "sink_dispatch",
          "conditions": [
            "Depends on config sink value"
          ],
          "operations": [
            {
              "operation": "Forward event payloads",
              "trigger": "Push add/update events to the selected sink backend",
              "implementation": "sinks.ManufactureSink() and eSink.UpdateEvents(eNew, eOld)"
            }
          ]
        }
      ]
    }
  }
}
