H-17: the node-engine's own name is read from its applied record or first composing
Discovery, the finding writer and the vault login names read it; no fixed name. Builds: design 47 G §527, §634 (A-149)
This commit is contained in:
@@ -160,7 +160,10 @@ const VaultSecretChanged = "mesh.mod.mesh-vault.event.secret-changed"
|
||||
|
||||
// Composer composes the node and is the agent's watcher of its compositions (agent.Env.Composed).
|
||||
type Composer struct {
|
||||
env Env
|
||||
// OnEngine is told the node-engine's own module each time a composing finds it (design 47 G §527, §634); set before the
|
||||
// composer runs.
|
||||
OnEngine func(module string)
|
||||
env Env
|
||||
|
||||
mu sync.Mutex
|
||||
wants map[string]meshwants.WantsByWantNodeModuleValue // by module, the node's own under agent.NodeModule
|
||||
@@ -2453,7 +2456,11 @@ func (c *Composer) noteEngine(module string) {
|
||||
}
|
||||
c.mu.Lock()
|
||||
c.engine = module
|
||||
on := c.OnEngine
|
||||
c.mu.Unlock()
|
||||
if on != nil {
|
||||
on(module)
|
||||
}
|
||||
}
|
||||
|
||||
// EngineModule is the node-engine's own module (design 47 G §527), for the apply guard; "" until a composing found it.
|
||||
|
||||
Reference in New Issue
Block a user