Skip to content
Snippets Groups Projects
Commit 68f3426e authored by Alena Petraki's avatar Alena Petraki
Browse files

Убрана неиспользуемая функция. Убран устаревший комментарий

parent 1f57fd0f
No related tags found
No related merge requests found
......@@ -2,8 +2,6 @@ package space
import (
"context"
"github.com/pkg/errors"
)
// @microgen grpc
......@@ -15,11 +13,8 @@ type Spaces interface {
// 1. Создается запись о пространстве
// 2. Создается БД пространства
// 3. Создается master окружение
// 4. Создаются необходимые схема согласно указанной конфигурации
// 5. Выполняется копирование данных согласно указанной конфигурации
// Шаги могут выполняться в отложенном режиме, при этом пространство может быть недоступно для
// выполнения любых операций. Попытка обращения к пространству будет сопровождаться ошибкой
// ErrUnavailable
// выполнения любых операций
Create(ctx context.Context, space *Space) (created *Space, err error)
Get(ctx context.Context, spaceId string) (space *Space, err error)
......@@ -28,17 +23,3 @@ type Spaces interface {
UpdateConfig(ctx context.Context, spaceId string, config *Config) (err error)
Delete(ctx context.Context, spaceId string) (err error)
}
func IsSpaceAvailable(ctx context.Context, spcs Spaces, spaceId string) error {
spc, err := spcs.Get(ctx, spaceId)
if err != nil {
return errors.Wrap(err, "space not available")
}
if spc.State != StateReady {
return errors.New("space not available")
}
return nil
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment