You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seek if we can use leverage a proper datastructure / type and iterate through it to pass parameter while using the querying method?
In client.rs separate the logic of building the different type of query (post, post_authenticated, login, logout) and the actual query to retrieve metrics (get_wan_config, get_status, get_devices, etc..), some how like a service <==> adapter "pattern"
If you are confident enough in rust, dig deeper in the structure of the project (module, trait, "class") etc
The text was updated successfully, but these errors were encountered:
The code has been pushed in early stage and i'm a beginner in rust, so I'm sure there is a plenty of room for improvement.
I didn't want to overengineer the codebase for such a simple usecase, but some part can be improve and discuss:
main.rs
like here https://github.com/tchapacan/livebox-exporter-rs/blob/main/src/main.rs#L176-L199 (and elsewhere as well)In
client.rs
separate the logic of building the different type of query (post, post_authenticated, login, logout) and the actual query to retrieve metrics (get_wan_config, get_status, get_devices, etc..), some how like aservice <==> adapter
"pattern"If you are confident enough in rust, dig deeper in the structure of the project (module, trait, "class") etc
The text was updated successfully, but these errors were encountered: