applyNodes pushes config to affected nodes after inbound association changes.
(nodeIDs []string)
| 823 | |
| 824 | // applyNodes pushes config to affected nodes after inbound association changes. |
| 825 | func (a *userAPI) applyNodes(nodeIDs []string) { |
| 826 | dial := a.dial |
| 827 | if dial == nil { |
| 828 | dial = a.base.Dial |
| 829 | } |
| 830 | for _, nodeID := range nodeIDs { |
| 831 | go func(id string) { |
| 832 | ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) |
| 833 | defer cancel() |
| 834 | if err := jobs.ApplyNode(ctx, id, a.nodes, a.users, a.inboundStore, a.outboundStore, dial, a.applyOpts); err != nil { |
| 835 | log.Printf("applyNodes: %s: %v", id, err) |
| 836 | } |
| 837 | }(nodeID) |
| 838 | } |
| 839 | } |
| 840 | |
| 841 | func ssPassword(method string) string { |
| 842 | size := 32 |
no test coverage detected