cli, engine, etcd, lib: Pass in init args

Improve the API and make it more general.
This commit is contained in:
James Shubin
2025-03-18 04:44:12 -04:00
parent 7ad54fe3e8
commit a7a5237b07
5 changed files with 45 additions and 26 deletions

View File

@@ -194,14 +194,16 @@ func (obj *DeployArgs) Run(ctx context.Context, data *cliUtil.Data) (bool, error
//MetadataPrefix: lib.MetadataPrefix,
//StoragePrefix: lib.StoragePrefix,
//StandaloneFs: ???.DeployFs, // used for static deploys
Debug: data.Flags.Debug,
Logf: func(format string, v ...interface{}) {
Logf("world: "+format, v...)
},
//GetURI: func() string {
//},
}
if err := world.Init(); err != nil {
worldInit := &engine.WorldInit{
Debug: data.Flags.Debug,
Logf: func(format string, v ...interface{}) {
Logf("world: etcd: "+format, v...)
},
}
if err := world.Init(worldInit); err != nil {
return false, errwrap.Wrapf(err, "world Init failed")
}
defer func() {