TriggerNodeSync 异步触发指定节点的 NodeGate sync。
(nodeID string)
| 647 | // TriggerNodeSync 异步触发指定节点的 NodeGate sync。 |
| 648 | |
| 649 | func (a *API) TriggerNodeSync(nodeID string) { |
| 650 | go func() { |
| 651 | ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) |
| 652 | defer cancel() |
| 653 | if err := a.doSyncNodeSNIProxy(ctx, nodeID); err != nil { |
| 654 | log.Printf("auto sniproxy sync node %s: %v", nodeID, err) |
| 655 | } |
| 656 | }() |
| 657 | } |
| 658 | |
| 659 | func (a *API) handleNodeSpeedTest(w http.ResponseWriter, r *http.Request, nodeID string) { |
| 660 | if r.Method != http.MethodPost { |
nothing calls this directly
no test coverage detected