forked from servicebinding/spec
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes servicebinding#101 Signed-off-by: Baiju Muthukadan <[email protected]>
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
``` | ||
` |