Use the repository path git.zb-server.de/Sebi/CephfsMig as module path instead of the non-importable name CephMig, and move the cephmig entry point from the repository root to cmd/cephmig next to cmd/nativeprobe. Makefile and Dockerfile.native build the new path. BREAKING CHANGE: import paths change from CephMig/... to git.zb-server.de/Sebi/CephfsMig/..., and the binary is now built from ./cmd/cephmig instead of the module root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
707 B
Go
28 lines
707 B
Go
//go:build ceph && cgo
|
|
|
|
package migration
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
|
|
"git.zb-server.de/Sebi/CephfsMig/internal/cephfsnative"
|
|
)
|
|
|
|
func openNativeEngine(ctx context.Context, c Config, x Executor, log io.Writer) (Engine, io.Closer, error) {
|
|
if err := ctx.Err(); err != nil {
|
|
return Engine{}, nil, err
|
|
}
|
|
source, err := cephfsnative.Open(options(c.Source))
|
|
if err != nil {
|
|
return Engine{}, nil, err
|
|
}
|
|
target, err := cephfsnative.Open(options(c.Target))
|
|
if err != nil {
|
|
source.Close()
|
|
return Engine{}, nil, err
|
|
}
|
|
backend := &nativeTransport{source: source, target: target, config: c, log: log}
|
|
return Engine{Exec: x, Log: log, Transport: backend, Access: nativeAccess{backend}}, backend, nil
|
|
}
|