mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
create corrosion store when initialising machine
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"net/netip"
|
||||
"uncloud/internal/machine/api/pb"
|
||||
"uncloud/internal/machine/network"
|
||||
"uncloud/internal/machine/store"
|
||||
"uncloud/internal/secret"
|
||||
)
|
||||
|
||||
@@ -19,14 +20,16 @@ type Cluster struct {
|
||||
pb.UnimplementedClusterServer
|
||||
|
||||
state *State
|
||||
store *store.Store
|
||||
|
||||
// TODO: temporary channel until the state is replaced with networkDB.
|
||||
newMachinesCh chan *pb.MachineInfo
|
||||
}
|
||||
|
||||
func NewCluster(state *State) *Cluster {
|
||||
func NewCluster(state *State, store *store.Store) *Cluster {
|
||||
return &Cluster{
|
||||
state: state,
|
||||
store: store,
|
||||
newMachinesCh: make(chan *pb.MachineInfo, 1),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user