h4. WHAT
Create a listener as it is done in the into the Mobile Catalog in order to know when the service is binding and unbinding in the app and call the respective service with the logic that should be made at this moments.
1. On app start, we list and watch all the secrets in the namespace, see: https://github.com/aerogear/mobile-developer-console/blob/master/cmd/api-server/main.go#L115-L118 2. Every time when there is a change in the secrets, we will go through them, find the ones we need and update the app's status. see: https://github.com/aerogear/mobile-developer-console/blob/master/pkg/stub/secretsChangeHandler.go#L10
There are some good references in these docs - https://docs.okd.io/latest/go_client/getting_started.html https://docs.okd.io/latest/go_client/standard_api_operations.html What you are looking for is the `watch` operation. Which watches a specific resource you have defined for events. Such as updates etc
|
|