Skip to content

Commit f7e9748

Browse files
committed
examples(spec): add RoutingContract example
1 parent 73db2d2 commit f7e9748

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

examples/routing_contract.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"id": "urn:srcos:routing-contract:checkout-example",
3+
"type": "RoutingContract",
4+
"specVersion": "2.0.0",
5+
"name": "checkout-example",
6+
"selectors": {
7+
"headers": [
8+
{ "name": "x-routing-key", "op": "equals", "value": "checkout-example" }
9+
],
10+
"actorRef": "urn:srcos:session:agent-example",
11+
"branchRef": "checkout-example",
12+
"missionRef": "urn:srcos:workflow:checkout-validation",
13+
"trustClass": "low"
14+
},
15+
"targets": [
16+
{
17+
"name": "checkout-http",
18+
"targetRef": "urn:srcos:workload:checkout",
19+
"port": 8080,
20+
"fallback": "baseline",
21+
"writePolicy": "isolated_only"
22+
}
23+
],
24+
"propagation": {
25+
"traceContext": "w3c",
26+
"extraHeaders": ["x-routing-key", "x-agent-session"]
27+
},
28+
"defaultDeny": false,
29+
"requireCapabilityToken": true,
30+
"readOnlySurface": false
31+
}

0 commit comments

Comments
 (0)