]> git.immae.eu Git - github/fretlink/ansible-kong-app.git/blobdiff - dhall/server/service/plugin/CorrelationId.dhall
config(dhall): add parameter 'generator' to CorrelationID plugin
[github/fretlink/ansible-kong-app.git] / dhall / server / service / plugin / CorrelationId.dhall
index 655cd8d792a7b7db28bad5e91be900ce822f6b8c..fc69f4ffef7dce98a7fd23c4cd34992c640f44c0 100644 (file)
@@ -2,10 +2,22 @@ let Plugin = ./Plugin.dhall
 
 let config = ./Config.dhall
 
-in    { name =
-                 "correlation-id"
-         , config =
-                 config.CorrelationId
-                 { header_name = "X-correl", echo_downstream = True }
-         }
-       : Plugin
+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