Skip to content

Store layer consolidation#6

Draft
JSYoo5B wants to merge 7 commits into
codex/04-sqlite-storage-baselinefrom
codex/05-store-layer-consolidation
Draft

Store layer consolidation#6
JSYoo5B wants to merge 7 commits into
codex/04-sqlite-storage-baselinefrom
codex/05-store-layer-consolidation

Conversation

@JSYoo5B

@JSYoo5B JSYoo5B commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds update operations needed by the next compatibility slices.
  • Moves repository implementations out of app packages and into store packages.
  • Keeps app services depending on repository interfaces rather than concrete storage.

Main Review Points

  • Store package layout and naming.
  • Image and volume update behavior.
  • Import direction after repository relocation.

Verification

  • go test ./...

Comment thread internal/api/router.go
imageService := appimage.NewService()
networkService := appnetwork.NewService()
volumeService := appvolume.NewService()
computeService := appcompute.NewServiceWithRuntime(

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This router now acts as the composition root for default in-memory services. The important dependency direction is API -> app interfaces plus store implementations supplied here, not app -> store concrete types.

Comment thread internal/api/router.go
clock.Wall(),
idgen.Random(),
)
networkService := appnetwork.NewServiceWithRepositories(

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Network has multiple repositories earlier than the other services because networks, subnets, and ports already have independent state. This is the representative wiring pattern for services that grow more than one resource store.

@@ -45,6 +45,31 @@ func (h Handler) getVolume(w http.ResponseWriter, r *http.Request) {
})
}

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update endpoints follow the existing handler convention rather than introducing a generic patch layer. That keeps this slice scoped to the compatibility calls currently needed.

@JSYoo5B JSYoo5B marked this pull request as draft July 2, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant