From 48d00b8322572a559a999865c448337681c41203 Mon Sep 17 00:00:00 2001 From: Jeremie Fraeys Date: Sat, 21 Feb 2026 14:11:10 -0500 Subject: [PATCH] feat: integrate native queue backend into worker and API - Add QueueBackendNative constant to backend.go - Add case for native queue in NewBackend() switch - Native queue uses same FilesystemPath config - Build tag -tags native_libs enables native implementation Native library integration now complete: - dataset_hash: Worker (hash_selector), CLI (verify auto-hash) - queue_index: Worker/API (backend selection with 'native' type) --- internal/queue/backend.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/queue/backend.go b/internal/queue/backend.go index f7f9ab3..8577b25 100644 --- a/internal/queue/backend.go +++ b/internal/queue/backend.go @@ -51,6 +51,7 @@ const ( QueueBackendRedis QueueBackend = "redis" QueueBackendSQLite QueueBackend = "sqlite" QueueBackendFS QueueBackend = "filesystem" + QueueBackendNative QueueBackend = "native" // Native C++ queue_index (requires -tags native_libs) ) type BackendConfig struct { @@ -85,6 +86,11 @@ func NewBackend(cfg BackendConfig) (Backend, error) { return nil, fmt.Errorf("filesystem queue path is required") } return NewFilesystemQueue(cfg.FilesystemPath) + case QueueBackendNative: + if strings.TrimSpace(cfg.FilesystemPath) == "" { + return nil, fmt.Errorf("native queue path is required") + } + return NewNativeQueue(cfg.FilesystemPath) case "", QueueBackendRedis: b, err := NewTaskQueue(Config{ RedisAddr: cfg.RedisAddr,