chore: store ServiceContainer (includes service spec) instead of Container in Corrosion store

This commit is contained in:
Pasha Sviderski
2025-08-14 14:53:33 +10:00
parent 9186d31d12
commit 4cc1e556dd
10 changed files with 174 additions and 95 deletions
+4 -3
View File
@@ -73,10 +73,11 @@ func WithWaitForNetworkReady(waitForNetworkReady func(ctx context.Context) error
}
}
// NewServer creates a new Docker gRPC server with the provided Docker client.
func NewServer(cli *client.Client, db *sqlx.DB, internalDNSIP func() netip.Addr, opts ...ServerOption) *Server {
// NewServer creates a new Docker gRPC server with the provided Docker service.
// TODO: refactor to use methods from the Docker service instead of querying the database directly.
func NewServer(service *Service, db *sqlx.DB, internalDNSIP func() netip.Addr, opts ...ServerOption) *Server {
s := &Server{
client: cli,
client: service.Client,
db: db,
internalDNSIP: internalDNSIP,
}