Function list API return more message
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
**Is your feature request related to a problem? Please describe.**
Now. function list API just return functions name and it's greate if return more message:
- Running [true/false]
- workerId ""
- Restarts (from status.numRestarts)
like this,
| NAME | RUNNING | RESTARTS | WORKERID |
| ---- | ---- | ---- | ---- |
| first | true | 0 | c-standalone-fw-localhost-8080 |
| second | false | 10 | c-standalone-fw-localhost-8080 |
**Describe the solution you'd like**
**Describe alternatives you've considered**
**Additional context**
I am not familiar with function code, but if want implement this function quickly and easily, Can process the code.
Request status API for every function name. I am not sure about that Quality and performance.
Componentlmpl#listFunctions
```
for (FunctionMetaData functionMetaData : functionStateList) {
if (InstanceUtils.calculateSubjectType(functionMetaData.getFunctionDetails()).equals(componentType)) {
*** get status ***
retVals.add(functionMetaData.getFunctionDetails().getName());
}
}
```
Contributor guide
Research direction
Start at ComponentImpl#listFunctions and trace how each function name is currently collected. Review the available status API and determine how running state, workerId, and status.numRestarts can be returned without an unacceptable per-function request cost. Done means the function list response includes the requested status fields and the relevant behavior is covered by the project's tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100