cli, engine, etcd, lib: Move the hostname value to the API

Every world implementation needs a unique UUID, might as well move this
to the API.
This commit is contained in:
James Shubin
2025-03-19 05:41:04 -04:00
parent 02fca6409a
commit 5665259784
5 changed files with 12 additions and 14 deletions

View File

@@ -621,8 +621,7 @@ func (obj *Main) Run() error {
// an etcd component from the etcd package added in.
var world engine.World
world = &etcd.World{
Hostname: hostname,
Client: client,
Client: client,
//NS: NS,
MetadataPrefix: MetadataPrefix,
StoragePrefix: StoragePrefix,
@@ -638,7 +637,6 @@ func (obj *Main) Run() error {
world = &etcdSSH.World{
URL: obj.SshUrl,
Seeds: obj.Seeds,
Hostname: hostname,
NS: NS,
MetadataPrefix: MetadataPrefix,
StoragePrefix: StoragePrefix,
@@ -652,7 +650,8 @@ func (obj *Main) Run() error {
}
}
worldInit := &engine.WorldInit{
Debug: obj.Debug,
Hostname: hostname,
Debug: obj.Debug,
Logf: func(format string, v ...interface{}) {
obj.Logf("world: etcd: "+format, v...)
},