MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / applyNodes

Method applyNodes

internal/serverapi/users.go:825–839  ·  view source on GitHub ↗

applyNodes pushes config to affected nodes after inbound association changes.

(nodeIDs []string)

Source from the content-addressed store, hash-verified

823
824// applyNodes pushes config to affected nodes after inbound association changes.
825func (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
841func ssPassword(method string) string {
842 size := 32

Callers 11

handleUsersMethod · 0.95
handleUserMethod · 0.95
handleUpdateUserMethod · 0.95
handleUserInboundsMethod · 0.95
handleUserInboundMethod · 0.95
triggerUserApplyMethod · 0.95
handleResetTrafficMethod · 0.95
handleUserGroupByIDMethod · 0.80
handleGroupMembersMethod · 0.80
handleGroupSyncMethod · 0.80

Calls 1

ApplyNodeFunction · 0.92

Tested by

no test coverage detected