Skip to content

Commit 490dabc

Browse files
committed
Add VolumeProtect stub implementation for tunnel/remote clients
1 parent 9ad4259 commit 490dabc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pkg/domain/infra/tunnel/volumes.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,15 @@ func (ic *ContainerEngine) VolumeExport(ctx context.Context, nameOrID string, op
121121
func (ic *ContainerEngine) VolumeImport(ctx context.Context, nameOrID string, options entities.VolumeImportOptions) error {
122122
return volumes.Import(ic.ClientCtx, nameOrID, options.Input)
123123
}
124+
125+
func (ic *ContainerEngine) VolumeProtect(ctx context.Context, namesOrIds []string, opts entities.VolumeProtectOptions) ([]*entities.VolumeProtectReport, error) {
126+
reports := make([]*entities.VolumeProtectReport, 0, len(namesOrIds))
127+
for _, nameOrId := range namesOrIds {
128+
report := &entities.VolumeProtectReport{
129+
Id: nameOrId,
130+
Err: errors.New("volume protection is not supported for remote clients"),
131+
}
132+
reports = append(reports, report)
133+
}
134+
return reports, nil
135+
}

0 commit comments

Comments
 (0)