From 5646d94d57ae8d19e965e995248919b6b03fd0bb Mon Sep 17 00:00:00 2001 From: Baiju Muthukadan Date: Wed, 30 Jun 2021 23:37:24 +0530 Subject: [PATCH] Add Implementor's Guide Fixes #101 Signed-off-by: Baiju Muthukadan --- docs/implementors-guide.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/implementors-guide.md diff --git a/docs/implementors-guide.md b/docs/implementors-guide.md new file mode 100644 index 0000000..a7a4f3c --- /dev/null +++ b/docs/implementors-guide.md @@ -0,0 +1,20 @@ +# Implementor's Guide + +## Purpose of the type and the provider fields in the application projection + +Service Binding specification mandates `type` field and recommends `provider` field in the binding Secret resource. The provider field is recommended to support scenarios where there could be different providers for the same Provisioned Service type. For example, if the type is `mysql`, the provider value could be `mariadb`, `oracle`, `bitnami`, `aws-rds`, etc. When the application is reading the binding values, if necessary, the application could consider `type` and `provider` as a composite key to avoid ambiguity. It will be helpful if an application needs to choose a particular provider based on the deployment environment. + +The language binding API can create two separate functions to retrieve bindings (with provider and without provider). For example, in Go: + +``` +GetBinding(_type string) (map[string]string, error) +GetBindingWithProvider(_type, provider string) (map[string]string, error) +``` + +Languages with parametric polymorphism can use a method with different parameters to retrieve bindings (with provider and without provider). For example, in Java: + +``` +public List filterBindings(@Nullable String type) +public List filterBindings(@Nullable String type, @Nullable String provider) +``` +`