-
-
Notifications
You must be signed in to change notification settings - Fork 7
Implemented the APIs based on template #15
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
base: main
Are you sure you want to change the base?
Conversation
Awesome work! |
KillAll() | ||
KillContainer(StartedContainer) error | ||
} | ||
|
||
type Storage interface { |
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.
Can we move this and other API code to separate file?
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.
By other API code, do you mean moving the handlers to a separate file too, or just the logic related functions?
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.
I mean move code with API and storage from manager which control Docker images, networks and containers
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.
Got it. I'll move the API handlers and storage logic into separate files
@@ -129,7 +144,29 @@ func (m *CodenireOrchestrator) Boot() (err error) { | |||
} | |||
|
|||
func (m *CodenireOrchestrator) GetTemplates() []BuiltImage { | |||
return m.imgs | |||
templates, err := m.storage.LoadTemplates() |
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.
Currentrly, GetTemplates() need for work Playground and should be connect to running images. So we can do it lately, when all logic with storage wiil be done
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.
Yeah, that makes sense. We'll update it once the storage logic is complete.
Changes Made:
Notes: