Skip to content

Commit 674182f

Browse files
committed
docker compose and rest requests sample
rest requests use https://github.com/pashky/restclient.el
1 parent b5fe096 commit 674182f

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

compose.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
services:
2+
go-feature-flag:
3+
image: gofeatureflag/go-feature-flag:latest
4+
ports:
5+
- 1031:1031 # relay proxy port
6+
volumes:
7+
# relay proxy config
8+
- ./src/test/resources/goff-proxy.yaml:/goff/goff-proxy.yaml
9+
# flags to be served
10+
- ./src/test/resources/go-feature-flags-flags.yaml:/goff/flags.yaml
11+
flagd:
12+
image: ghcr.io/open-feature/flagd:latest
13+
command: start --uri file:/etc/flagd/flagd-test-flags.json
14+
ports:
15+
- 8013:8013 # standard port
16+
- 8016:8016 # ofrep port
17+
volumes:
18+
- ./src/test/resources:/etc/flagd

flag-provider-requests.restclient

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
### flagd ###
2+
POST http://localhost:8013/flagd.evaluation.v1.Service/ResolveString
3+
Content-Type: application/json
4+
5+
{
6+
"flagKey": "static-string-flag",
7+
"context": {}
8+
}
9+
10+
### ofrep ###
11+
12+
# flagd bulk
13+
POST http://localhost:8016/ofrep/v1/evaluate/flags
14+
15+
# flagd flag
16+
POST http://localhost:8016/ofrep/v1/evaluate/flags/static-string-flag
17+
18+
# go-feature-flag
19+
POST http://localhost:1031/ofrep/v1/evaluate/flags/staticstringflag
20+
Content-Type: application/json
21+
22+
{
23+
"context": {
24+
"targetingKey": "key"
25+
}
26+
}
27+
28+
# go-feature-flag bulk
29+
POST http://localhost:1031/ofrep/v1/evaluate/flags
30+
Content-Type: application/json
31+
32+
{
33+
"context": {
34+
"targetingKey": "key"
35+
}
36+
}

0 commit comments

Comments
 (0)