pkalsi97 commented on PR #6418:
URL: https://github.com/apache/camel-k/pull/6418#issuecomment-3650784808
@squakez Thanks for the initial review. Yes some files did not get
committed.
Even I was thinking there is a certain flaw with my current implementation -
The current implementation is an all or nothing type where either client can
opt for auto discovery or simply add the triggers for all resources manually
and no auto discovery will happen, I can think of 3 cases.
| Case | Scenario | Behavior |
|------|----------|----------|
| 1 | No triggers specified | Auto-discover all triggers from URI |
| 2 | Triggers specified | If trigger type is not auto-discoverable → add
it. If trigger type matches auto-discoverable resource → use user's trigger
(skip auto-discovery for that type). Auto-discover remaining supported types
from URI. |
| 3 | Extra params for auto-discoverable type | User can pass additional
metadata params that get merged with auto-discovered params |
What do you think about this merged approach ?
Secondly regarding structure of the code: Definitely can work on a better
interface based approach as you suggested with `ScaleMapper interface`
```
pkg/trait/keda/
├── mapper.go
├── uri_parser.go
└── scalers/
├── kafka.go
├── sqs.go
└── rabbitmq.go
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]