/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
cloud/disk_manager/internal/pkg/cells/interface.go
61 строка
2 KB
Andrei Galibin
[NBS] Fix PG and disk routing to different NBS cells (#6262)
24 июн 2026, 06:15
Не верифицирован
24 июн 2026, 06:15
a839342
Код
Авторство
О чём код?
package cells import ( "context" "github.com/ydb-platform/nbs/cloud/disk_manager/internal/pkg/clients/nbs" "github.com/ydb-platform/nbs/cloud/disk_manager/internal/pkg/clients/nfs" "github.com/ydb-platform/nbs/cloud/disk_manager/internal/pkg/resources" "github.com/ydb-platform/nbs/cloud/disk_manager/internal/pkg/types" ) //////////////////////////////////////////////////////////////////////////////// type CellSelector interface { // Returns copy of disk with replaced zone ID with cell ID. ReplaceZoneIdWithCellIdInDiskMeta( ctx context.Context, storage resources.Storage, disk *types.Disk, ) (*types.Disk, error) // Returns an nbs Client for the most suitable cell in the specified zone. // If the Cells mechanism is not enabled for this folder, returns an // nbs Client for specified zone. SelectCellForDisk( ctx context.Context, zoneID string, folderID string, kind types.DiskKind, requireExactCellIDMatch bool, ) (nbs.Client, error) SelectCellForLocalDisk( ctx context.Context, zoneID string, agentIDs []string, ) (nbs.Client, error) // Returns an nbs Client for the most suitable cell in the specified zone // for a placement group. Folder-based filtering is not applied. SelectCellForPlacementGroup( ctx context.Context, zoneID string, ) (nbs.Client, error) // Returns an nfs Client for the most suitable cell in the specified zone. // If the Cells mechanism is not enabled for this folder, returns an // nfs Client for specified zone. SelectCellForFilesystem( ctx context.Context, zoneID string, folderID string, ) (nfs.Client, error) ZoneContainsCell(zoneID string, cellID string) bool // Returns all cell IDs that belong to the given zone. // If no cells config is set, returns []string{zoneID}. // If zoneId is cell ID, returns []string{zoneID}. ResolveCells(zoneID string) ([]string, error) }