mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
init cluster store backed by corrosion
This commit is contained in:
@@ -1,6 +1,28 @@
|
|||||||
package store
|
package store
|
||||||
|
|
||||||
import _ "embed"
|
import (
|
||||||
|
_ "embed"
|
||||||
|
"fmt"
|
||||||
|
"uncloud/internal/corrosion"
|
||||||
|
"uncloud/internal/machine/api/pb"
|
||||||
|
)
|
||||||
|
|
||||||
//go:embed schema.sql
|
//go:embed schema.sql
|
||||||
var Schema string
|
var Schema string
|
||||||
|
|
||||||
|
// Store is a cluster store backed by a distributed Corrosion database.
|
||||||
|
type Store struct {
|
||||||
|
corro *corrosion.APIClient
|
||||||
|
}
|
||||||
|
|
||||||
|
func New(corro *corrosion.APIClient) *Store {
|
||||||
|
return &Store{corro: corro}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *Store) CreateMachine(machine *pb.MachineInfo) error {
|
||||||
|
return fmt.Errorf("not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *Store) ListMachines() ([]*pb.MachineInfo, error) {
|
||||||
|
return nil, fmt.Errorf("not implemented")
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user