Skip to content

Commit

Permalink
Add Implementor's Guide
Browse files Browse the repository at this point in the history
Fixes servicebinding#101

Signed-off-by: Baiju Muthukadan <[email protected]>
  • Loading branch information
baijum committed Jun 30, 2021
1 parent 2dceb46 commit 5646d94
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/implementors-guide.md
Original file line number Diff line number Diff line change
@@ -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<Binding> filterBindings(@Nullable String type)
public List<Binding> filterBindings(@Nullable String type, @Nullable String provider)
```
`

0 comments on commit 5646d94

Please sign in to comment.