MCPcopy Create free account
hub / github.com/bodaay/HuggingFaceModelDownloader / settingsConfig

Method settingsConfig

internal/server/server.go:114–118  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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.
114func (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.
121func (s *Server) ListenAndServe(ctx context.Context) error {

Callers 2

handleGetSettingsMethod · 0.95
TestSettingsUpdateNoRaceFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestSettingsUpdateNoRaceFunction · 0.64