mirror of
https://github.com/Awuqing/BackupX.git
synced 2026-09-05 15:37:03 +08:00
refactor: simplify architecture and harden lifecycle
Remove obsolete implementations, centralize background task ownership and terminal-state recovery, consolidate frontend routing and log streaming, and enforce project-wide verification in CI.
This commit is contained in:
@@ -20,6 +20,18 @@ func NewRegistry(runners ...BackupRunner) *Registry {
|
||||
return registry
|
||||
}
|
||||
|
||||
// NewDefaultRegistry returns the runner set shared by Master and Agent.
|
||||
func NewDefaultRegistry() *Registry {
|
||||
return NewRegistry(
|
||||
NewFileRunner(),
|
||||
NewSQLiteRunner(),
|
||||
NewMySQLRunner(nil),
|
||||
NewPostgreSQLRunner(nil),
|
||||
NewSAPHANARunner(nil),
|
||||
NewMongoDBRunner(nil),
|
||||
)
|
||||
}
|
||||
|
||||
func (r *Registry) Register(runner BackupRunner) {
|
||||
if runner == nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user