SetZeroMyAddr overrides the --my flag for the specified Zero node. The next time the container is recreated (via RecreateZero), this address will be used instead of the default container alias.
(id int, addr string)
| 629 | // time the container is recreated (via RecreateZero), this address will be |
| 630 | // used instead of the default container alias. |
| 631 | func (c *LocalCluster) SetZeroMyAddr(id int, addr string) error { |
| 632 | if id >= c.conf.numZeros { |
| 633 | return fmt.Errorf("invalid id of zero: %v", id) |
| 634 | } |
| 635 | c.zeros[id].myAddrOverride = addr |
| 636 | return nil |
| 637 | } |
| 638 | |
| 639 | // RecreateZero destroys the Zero container and creates a new one with the |
| 640 | // current command-line flags (e.g. a different --my address). The Zero's data |