Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame contribute delete
281 Bytes
package main
import (
"net/http"
"sync"
)
type RR struct {
h []http.Handler
n int
mx sync.Mutex
}
func (r *RR) ServeHTTP(w http.ResponseWriter, req *http.Request) {
r.mx.Lock()
handler := r.h[r.n]
r.n = (r.n + 1) % len(r.h)
r.mx.Unlock()
handler.ServeHTTP(w, req)
}