MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / reloadLoop

Method reloadLoop

auth/basic.go:111–124  ·  view source on GitHub ↗
(interval time.Duration)

Source from the content-addressed store, hash-verified

109}
110
111func (auth *BasicAuth) reloadLoop(interval time.Duration) {
112 ticker := time.NewTicker(interval)
113 defer ticker.Stop()
114 for {
115 select {
116 case <-auth.stopChan:
117 return
118 case <-ticker.C:
119 if err := auth.reload(); err != nil {
120 auth.logger.Error("reload failed: %v", err)
121 }
122 }
123 }
124}
125
126func (auth *BasicAuth) Valid(user, password, userAddr string) bool {
127 pwFile := auth.pw.Load().file

Callers 1

NewBasicFileAuthFunction · 0.95

Calls 2

reloadMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected