Add native Notarius readiness checks
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/audita"
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/notarius"
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/scriptorium"
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/storage"
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||
@@ -19,6 +20,7 @@ type commandDependencies struct {
|
||||
newObjectStore func(context.Context, *config.Config) (storage.ObjectStore, error)
|
||||
newScriptorium func() scriptorium.Runner
|
||||
newAudita func(*config.Config) (audita.Runner, error)
|
||||
newNotarius func() notarius.Runner
|
||||
discoverRemoteCurrentState func(context.Context, *config.Config, storage.ObjectStore) (*RemoteCurrentState, error)
|
||||
buildRestorePlan func(context.Context, *config.Config, *RemoteCurrentState, storage.ObjectStore, RestorePlanOptions) (*RestorePlan, error)
|
||||
executeRestorePlan func(context.Context, *config.Config, *RemoteCurrentState, *RestorePlan, *RestoreReport, storage.ObjectStore) (*RestoreExecutionResult, error)
|
||||
@@ -39,6 +41,9 @@ func normalizeCommandDependencies(deps commandDependencies) commandDependencies
|
||||
if deps.newAudita == nil {
|
||||
deps.newAudita = buildDefaultAuditaRunner
|
||||
}
|
||||
if deps.newNotarius == nil {
|
||||
deps.newNotarius = func() notarius.Runner { return notarius.NewSubprocessRunner() }
|
||||
}
|
||||
if deps.newScriptorium == nil {
|
||||
deps.newScriptorium = defaultScriptoriumRunner
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user