fetch_ml/internal/worker/native_bridge_nocgo.go
Jeremie Fraeys fc2459977c
refactor(worker): update worker tests and native bridge
**Worker Refactoring:**
- Update internal/worker/factory.go, worker.go, snapshot_store.go
- Update native_bridge.go and native_bridge_nocgo.go for native library integration

**Test Updates:**
- Update all worker unit tests for new interfaces
- Update chaos tests
- Update container/podman_test.go
- Add internal/workertest/worker.go for shared test utilities

**Documentation:**
- Update native/README.md
2026-02-23 18:04:22 -05:00

40 lines
1 KiB
Go

//go:build !cgo
// +build !cgo
package worker
import (
"errors"
"github.com/jfraeys/fetch_ml/internal/manifest"
)
// HashFilesBatchNative is not available without CGO.
func HashFilesBatchNative(paths []string) ([]string, error) {
return nil, errors.New("native batch hash requires CGO")
}
// GetSIMDImplName returns "disabled" without CGO.
func GetSIMDImplName() string {
return "disabled (no CGO)"
}
// HasSIMDSHA256 returns false without CGO.
func HasSIMDSHA256() bool {
return false
}
// ScanArtifactsNative is disabled without CGO.
func ScanArtifactsNative(runDir string) (*manifest.Artifacts, error) {
return nil, errors.New("native artifact scanner requires CGO")
}
// ExtractTarGzNative is disabled without CGO.
func ExtractTarGzNative(archivePath, dstDir string) error {
return errors.New("native tar.gz extractor requires CGO")
}
// DirOverallSHA256HexNative is disabled without CGO.
func DirOverallSHA256HexNative(root string) (string, error) {
return "", errors.New("native hash requires CGO")
}