register_negentropy.go raw

   1  //go:build !(js && wasm)
   2  
   3  package sync
   4  
   5  import (
   6  	"context"
   7  
   8  	"next.orly.dev/pkg/database"
   9  )
  10  
  11  func init() {
  12  	// Register the Negentropy driver with the driver registry.
  13  	RegisterDriver("negentropy", "NIP-77 negentropy set reconciliation", negentropyFactory)
  14  }
  15  
  16  // negentropyFactory creates a new Negentropy sync service instance.
  17  func negentropyFactory(ctx context.Context, db database.Database, cfg *DriverConfig) (Service, error) {
  18  	// Negentropy sync is implemented as a standalone service
  19  	// The actual implementation would create a negentropy.Service here
  20  	return &stubService{name: "negentropy"}, nil
  21  }
  22  
  23  // stubService is a placeholder for sync services not yet integrated
  24  type stubService struct {
  25  	name string
  26  }
  27  
  28  func (s *stubService) Start() error { return nil }
  29  func (s *stubService) Stop() error  { return nil }
  30  func (s *stubService) Type() string { return s.name }
  31