From 8aec5390806bcdd7ec2d8ec9c81fa1dfde56f720 Mon Sep 17 00:00:00 2001 From: Maximilian Moehl Date: Tue, 23 Jan 2024 09:25:11 +0100 Subject: [PATCH] rfc: apply suggestions from review Co-Authored-By: Dominik Froehlich --- .../rfc-draft-generic-per-route-features.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/toc/rfc/rfc-draft-generic-per-route-features.md b/toc/rfc/rfc-draft-generic-per-route-features.md index e6692b14f..df0d45829 100644 --- a/toc/rfc/rfc-draft-generic-per-route-features.md +++ b/toc/rfc/rfc-draft-generic-per-route-features.md @@ -27,6 +27,11 @@ SHOULD ignore the contents of the map except gorouter, cloud controller and cf C the map and its values accordingly. Other components MAY limit the size of the map or size of keys / values for technical reasons. +The following constraints apply (types are as specified in [RFC 8259](https://rfc-editor.org/rfc/rfc8259)): +* The map MUST be representable as an object. +* The map MUST only use strings as keys. +* The map MUST only use numbers, strings and the literal values `true` and `false` as values. + ### Required Changes #### CLI @@ -62,6 +67,37 @@ with the generic logic for supporting the new map. As new features are specified they MUST be implemented in gorouter. +Example `router.register` NATS message containing additional options (field names and values are not +final): + +```json +{ + "host": "127.0.0.1", + "port": 4567, + "tls_port": 1234, + "protocol": "http1", + "uris": [ + "my_first_url.localhost.routing.cf-app.com", + "my_second_url.localhost.routing.cf-app.com/some-path" + ], + "tags": { + "another_key": "another_value", + "some_key": "some_value" + }, + "options": { + "lb-algo": "least-conn", + "conn-limit": 100, + "cookie": "my-session-cookie", + "trim-path": true + }, + "app": "some_app_guid", + "stale_threshold_in_seconds": 120, + "private_instance_id": "some_app_instance_id", + "isolation_segment": "some_iso_seg_name", + "server_cert_domain_san": "some_subject_alternative_name" +} +``` + To-Do: * Can we somehow report errors from gorouter back to the user?