feat(dns): cluster API for reserving/releasing cluster domain in Uncloud DNS

This commit is contained in:
Pavel Sviderski
2025-02-24 17:35:19 +10:00
parent f37bfd01fe
commit f6cf5cc250
8 changed files with 349 additions and 77 deletions
+5
View File
@@ -49,6 +49,11 @@ func (s *Store) Put(ctx context.Context, key string, value any) error {
return err
}
func (s *Store) Delete(ctx context.Context, key string) error {
_, err := s.corro.ExecContext(ctx, "DELETE FROM cluster WHERE key = ?", key)
return err
}
func (s *Store) CreateMachine(ctx context.Context, m *pb.MachineInfo) error {
mJSON, err := protojson.Marshal(m)
if err != nil {