Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JackyChiu/slb
/ functions
Functions
49 in github.com/JackyChiu/slb
⨍
Functions
49
◇
Types & classes
9
↓ 7 callers
Function
newNodes
(hosts []string)
node.go:25
↓ 4 callers
Method
String
()
node.go:61
↓ 3 callers
Method
Dispatch
()
balancer.go:20
↓ 3 callers
Method
Len
()
node.go:33
↓ 3 callers
Method
complete
(host string)
least_busy.go:58
↓ 3 callers
Function
newLeastBusy
(hosts []string)
least_busy.go:17
↓ 3 callers
Function
newRoundRobin
(hosts []string)
round_robin.go:18
↓ 2 callers
Method
Pop
()
node.go:53
↓ 2 callers
Method
Push
(x interface{})
node.go:47
↓ 2 callers
Method
mean
()
node.go:80
↓ 1 callers
Method
Complete
(res *http.Response)
balancer.go:21
↓ 1 callers
Function
NewBalancer
NewBalancer creates a new balancer to balance requests between hosts and uses specified strategy.
balancer.go:44
↓ 1 callers
Function
NewPool
NewPool provides a pool with specified strategy.
balancer.go:25
↓ 1 callers
Function
ParseConfig
ParseConfig reads a json file and maps it to a Config object.
config.go:17
↓ 1 callers
Function
StartServer
StartServer starts up a indiviual server running on specified port.
cmd/servers/server.go:44
↓ 1 callers
Method
Swap
(i, j int)
node.go:41
↓ 1 callers
Method
balance
()
round_robin.go:46
↓ 1 callers
Method
balance
()
least_busy.go:39
↓ 1 callers
Method
complete
(host string)
round_robin.go:64
↓ 1 callers
Method
dispatch
()
round_robin.go:57
↓ 1 callers
Method
dispatch
()
least_busy.go:50
↓ 1 callers
Function
newNode
(host string, index int)
node.go:15
↓ 1 callers
Function
randomPause
()
cmd/requester/requester.go:37
↓ 1 callers
Function
randonDuration
()
cmd/requester/requester.go:42
↓ 1 callers
Method
standardDeviation
()
node.go:88
Method
Complete
(res *http.Response)
round_robin.go:42
Method
Complete
(res *http.Response)
least_busy.go:35
Method
Director
Director directs the request to the node that was dispatched by pool.
balancer.go:58
Method
Dispatch
()
round_robin.go:36
Method
Dispatch
()
least_busy.go:29
Method
Less
(i, j int)
node.go:37
Method
ModifyResponse
ModifyResponse tells the pool that the request was handled.
balancer.go:67
Function
MustParseConfig
MustParseConfig parse and config file and panics on failure.
config.go:29
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
cmd/servers/server.go:68
Method
String
()
round_robin.go:73
Method
String
()
least_busy.go:71
Function
TestBalancer
(t *testing.T)
balancer_test.go:13
Function
TestLeastBusy_Dispatch
(t *testing.T)
least_busy_test.go:10
Function
TestLeastBusy_complete
(t *testing.T)
least_busy_test.go:26
Function
TestNodes_Len
(t *testing.T)
node_test.go:29
Function
TestNodes_Pop
(t *testing.T)
node_test.go:47
Function
TestNodes_Push
(t *testing.T)
node_test.go:59
Function
TestNodes_Swap
(t *testing.T)
node_test.go:34
Function
TestNodes_newNodes
(t *testing.T)
node_test.go:17
Function
TestRoundRobin_Dispatch
(t *testing.T)
round_robin_test.go:10
Function
TestRoundRobin_complete
(t *testing.T)
round_robin_test.go:32
Function
main
()
cmd/servers/server.go:16
Function
main
()
cmd/slb/slb.go:12
Function
main
()
cmd/requester/requester.go:13