aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorpaulrbr-fl <43074087+paulrbr-fl@users.noreply.github.com>2019-08-08 16:07:12 +0200
committerGitHub <noreply@github.com>2019-08-08 16:07:12 +0200
commitcfcebcd5f0c7a99ab60de773e67e7ee35e8b0f0a (patch)
tree6aefb077fc07a715edb478cef3e8fc3a24e3a45c
parentf820c109a54ea5c09fcff01025ba3ab63f18912c (diff)
parent42e5588b7feb13e90964b5371fb9f1bdcfaf793a (diff)
downloadansible-kong-app-cfcebcd5f0c7a99ab60de773e67e7ee35e8b0f0a.tar.gz
ansible-kong-app-cfcebcd5f0c7a99ab60de773e67e7ee35e8b0f0a.tar.zst
ansible-kong-app-cfcebcd5f0c7a99ab60de773e67e7ee35e8b0f0a.zip
Merge pull request #16 from paulrbr-fl/add-default-correlation-idv0.10
config(dhall): add parameter 'generator' to CorrelationID plugin
-rw-r--r--dhall/server/service/plugin/Config.dhall4
-rw-r--r--dhall/server/service/plugin/CorrelationId.dhall26
2 files changed, 21 insertions, 9 deletions
diff --git a/dhall/server/service/plugin/Config.dhall b/dhall/server/service/plugin/Config.dhall
index d54436b..ea53361 100644
--- a/dhall/server/service/plugin/Config.dhall
+++ b/dhall/server/service/plugin/Config.dhall
@@ -1,9 +1,9 @@
1< CorrelationId : 1< CorrelationId :
2 { header_name : Text, echo_downstream : Bool } 2 { header_name : Text, echo_downstream : Bool, generator : Text }
3| RequestTransformer : 3| RequestTransformer :
4 { add : { headers : List Text } } 4 { add : { headers : List Text } }
5| RequestTermination : 5| RequestTermination :
6 { status_code : Natural, content_type : Text, body : Text } 6 { status_code : Natural, content_type : Text, body : Text }
7| IPRestriction : 7| IPRestriction :
8 { whitelist : Text } 8 { whitelist : Text }
9> \ No newline at end of file 9>
diff --git a/dhall/server/service/plugin/CorrelationId.dhall b/dhall/server/service/plugin/CorrelationId.dhall
index 655cd8d..fc69f4f 100644
--- a/dhall/server/service/plugin/CorrelationId.dhall
+++ b/dhall/server/service/plugin/CorrelationId.dhall
@@ -2,10 +2,22 @@ let Plugin = ./Plugin.dhall
2 2
3let config = ./Config.dhall 3let config = ./Config.dhall
4 4
5in { name = 5in λ(generator : Optional Text)
6 "correlation-id" 6 → { name =
7 , config = 7 "correlation-id"
8 config.CorrelationId 8 , config =
9 { header_name = "X-correl", echo_downstream = True } 9 config.CorrelationId
10 } 10 { header_name =
11 : Plugin 11 "X-correl"
12 , echo_downstream =
13 True
14 , generator =
15 Optional/fold
16 Text
17 generator
18 Text
19 (λ(t : Text) → t)
20 "uuid#counter"
21 }
22 }
23 : Plugin