]> git.immae.eu Git - github/fretlink/ansible-kong-app.git/blobdiff - dhall/server/service/plugin/correlationId.dhall
upgrade dhall to 1.26.1 and merge types and terms
[github/fretlink/ansible-kong-app.git] / dhall / server / service / plugin / correlationId.dhall
diff --git a/dhall/server/service/plugin/correlationId.dhall b/dhall/server/service/plugin/correlationId.dhall
new file mode 100644 (file)
index 0000000..d5d5928
--- /dev/null
@@ -0,0 +1,23 @@
+let Plugin = ./Plugin.dhall
+
+let config = ./Config.dhall
+
+in    λ(generator : Optional Text)
+    →   { name =
+            "correlation-id"
+        , config =
+            config.CorrelationId
+            { header_name =
+                "X-correl"
+            , echo_downstream =
+                True
+            , generator =
+                Optional/fold
+                Text
+                generator
+                Text
+                (λ(t : Text) → t)
+                "uuid#counter"
+            }
+        }
+      : Plugin