mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
cmd/dockerd: rewrite getSwarmRunRoot to a regular func
This method only required the config to be passed; rewrite it to a regular func that accepts the config. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -941,7 +941,7 @@ func createAndStartCluster(cli *daemonCLI, d *daemon.Daemon) (*cluster.Cluster,
|
||||
DefaultAdvertiseAddr: cli.Config.SwarmDefaultAdvertiseAddr,
|
||||
RaftHeartbeatTick: cli.Config.SwarmRaftHeartbeatTick,
|
||||
RaftElectionTick: cli.Config.SwarmRaftElectionTick,
|
||||
RuntimeRoot: cli.getSwarmRunRoot(),
|
||||
RuntimeRoot: getSwarmRunRoot(cli.Config),
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -66,8 +66,8 @@ func (cli *daemonCLI) setupConfigReloadTrap() {
|
||||
|
||||
// getSwarmRunRoot gets the root directory for swarm to store runtime state
|
||||
// For example, the control socket
|
||||
func (cli *daemonCLI) getSwarmRunRoot() string {
|
||||
return filepath.Join(cli.Config.ExecRoot, "swarm")
|
||||
func getSwarmRunRoot(cfg *config.Config) string {
|
||||
return filepath.Join(cfg.ExecRoot, "swarm")
|
||||
}
|
||||
|
||||
// allocateDaemonPort ensures that there are no containers
|
||||
|
||||
@@ -88,7 +88,7 @@ func (cli *daemonCLI) setupConfigReloadTrap() {
|
||||
|
||||
// getSwarmRunRoot gets the root directory for swarm to store runtime state
|
||||
// For example, the control socket
|
||||
func (cli *daemonCLI) getSwarmRunRoot() string {
|
||||
func getSwarmRunRoot(*config.Config) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user