settingsConfig returns a snapshot of the API-mutable settings under the read lock. Callers that need the current Token/Concurrency/Verify/Proxy/etc. use this so they never read a field while handleUpdateSettings is writing it.
()
| 112 | // lock. Callers that need the current Token/Concurrency/Verify/Proxy/etc. use |
| 113 | // this so they never read a field while handleUpdateSettings is writing it. |
| 114 | func (s *Server) settingsConfig() Config { |
| 115 | s.configMu.RLock() |
| 116 | defer s.configMu.RUnlock() |
| 117 | return s.config |
| 118 | } |
| 119 | |
| 120 | // ListenAndServe starts the HTTP server. |
| 121 | func (s *Server) ListenAndServe(ctx context.Context) error { |
no outgoing calls