This Kong plugin acts as a client for checkr/idempotent-requests
server.
It follows behaviors described in IETF draft for standardized Idempotency-Key
header.
HTTP/2
and gRPC
(due to the underlying Nginx limitation).
Config | Required | Default | Explanation |
---|---|---|---|
idempotent_requests_server_url |
yes | N/A | Idempotent Requests server URL |
idempotency_key_header_name |
no | Idempotency-Key |
HTTP header name with Idempotency Key |
timeout |
no | 30000 |
Timeout (msec) to talk with Idempotent Requests server |
plugins:
- name: idempotent-requests
enabled: true
protocols:
- http
- https
config:
idempotent_requests_server_url: "http://idempotent-requests-server:8080"
# Lua dependency management
brew install luarocks
# linter
luarocks install luacheck
# testing framework
luarocks install busted
- Check out
https://github.com/checkr/idempotent-requests
into../idempotent-requests
- Check out
https://github.com/Kong/kong-pongo
into../../kong/kong-pongo
# Run Kong Pongo
../../kong-pongo/pongo.sh up
../../kong-pongo/pongo.sh build
# Run Idempotent Requests Server
docker-compose -f ../idempotent-requests/docker-compose.yml \
-f ../idempotent-requests/docker-compose.server.yml \
-f ../idempotent-requests/docker-compose.mongo-express.yml \
-f docker-compose.network.yml up -d
# Run Lint
../../kong-pongo/pongo.sh lint
# Run Integration Tests
../../kong-pongo/pongo.sh run