https://github.com/farukterzioglu/martian-components
A collection of Martian modifiers for KrakenD-CE
https://github.com/farukterzioglu/martian-components
api-gateway http-header krakend round-robin
Last synced: 7 months ago
JSON representation
A collection of Martian modifiers for KrakenD-CE
- Host: GitHub
- URL: https://github.com/farukterzioglu/martian-components
- Owner: farukterzioglu
- Created: 2021-04-03T18:46:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-03T22:39:32.000Z (over 4 years ago)
- Last Synced: 2025-01-06T16:16:40.953Z (9 months ago)
- Topics: api-gateway, http-header, krakend, round-robin
- Language: Go
- Homepage:
- Size: 59.8 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A collection of [Martian](https://github.com/devopsfaith/krakend-martian) modifiers for [KrakenD-CE](https://github.com/devopsfaith/krakend-ce)
- Round Robin Header Selector
Adds a new http request header with a value that selected as round robin.
Sample configuration;
```
"github.com/devopsfaith/krakend-martian": {
"header.RoundRobin": {
"name": "TRON-PRO-API-KEY",
"values": [
"9edf0885-8371-495f-9d59-befb9ce56885",
"634de746-81f8-43c7-be3b-dc8eaa7d856e",
"9e5b8bc5-9d4f-4fea-a967-e41f15f3b2b0"
],
"printSelectedValue": true
}
}
```### How to use
#### Add to KrakenD-CE Direclty
Create a file inside [KrakenD-CE](https://github.com/devopsfaith/krakend-ce) as `./cmd/krakend-ce/header-roundrobin.go` with content of `header-roundrobin.go` and build KrakenD-CE (`make build`)#### Or build as plugin
`go build -buildmode=plugin -o krakend-martian_header-roundrobin.so ./header/roundrobin`Run the KrakenD-CE
`./krakend run -c krakend.json`### Notes
https://github.com/google/martianWebsite development as a sysadmin
https://www.krakend.io/blog/website-development-as-a-sysadmin/How to work with Golang plugins and KrakenD
https://www.krakend.io/blog/krakend-golang-plugins/