-
Notifications
You must be signed in to change notification settings - Fork 2
WIP - Feature/v2 initial modules rest client #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ry outside the SDK. Like type, constant...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR. Thanks :)
…ry env var aren't available.
… the design paterns and choice, etc.
…it is coupled to the pooling task logic. Will fix it when I create task interface to be able to mock with the header on the interface.
Welcome and thank you ! Sorry it's a bit long to review :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great update and nice documentation!
…it was for dev purposes. The task will be added in its own service with the new PR for the backup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :-)
Xen Orchestra Go SDK v2 - REST API Implementation
Overview
This PR introduces v2 of our Xen Orchestra Go SDK, moving from JSON-RPC to REST API. This is a major improvement to our codebase.
Key Features
Design Improvements
The v2 implementation brings several important benefits:
TypedGet
,TypedPost
) remove repetitive codelibrary
package has clear interfaces for easy testingclient.VM().Create()
instead ofclient.CreateVM()
)Implementation Notes
Service Naming: The term "service" works well in our SDK context, even though it might have other meanings in different architectures
Payload vs. Model: We use "payloads" to show their API communication role, though they also act as data models
Task Polling: Currently, async task polling is in the VM service for quick development. Later, we'll move it to its own interface for better separation
Usage Example
This PR shows that our v2 approach works well and is cleaner than v1. We'll add more services using this pattern in future PRs.