MCPcopy
hub / github.com/gofiber/fiber / get

Method get

middleware/proxy/proxy.go:261–272  ·  view source on GitHub ↗

this method will return a string of addr server from list server.

()

Source from the content-addressed store, hash-verified

259
260// this method will return a string of addr server from list server.
261func (r *roundrobin) get() string {
262 r.Lock()
263 defer r.Unlock()
264
265 if r.current >= len(r.pool) {
266 r.current %= len(r.pool)
267 }
268
269 result := r.pool[r.current]
270 r.current++
271 return result
272}
273
274// BalancerForward Forward performs the given http request with round robin algorithm to server and fills the given http response.
275// This method will return a fiber.Handler

Callers 1

BalancerForwardFunction · 0.95

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected