mirror of
https://github.com/mailgun/groupcache.git
synced 2024-11-16 14:10:04 +00:00
Compare commits
1 Commits
9c7726c82b
...
e6ae355724
Author | SHA1 | Date | |
---|---|---|---|
|
e6ae355724 |
5
http.go
5
http.go
@ -40,8 +40,6 @@ const defaultReplicas = 50
|
||||
|
||||
// HTTPPool implements PeerPicker for a pool of HTTP peers.
|
||||
type HTTPPool struct {
|
||||
ws *workspace
|
||||
|
||||
// this peer's base URL, e.g. "https://example.net:8000"
|
||||
self string
|
||||
|
||||
@ -106,7 +104,6 @@ func NewHTTPPoolOptsWithWorkspace(ws *workspace, self string, o *HTTPPoolOptions
|
||||
ws.httpPoolMade = true
|
||||
|
||||
p := &HTTPPool{
|
||||
ws: ws,
|
||||
self: self,
|
||||
httpGetters: make(map[string]*httpGetter),
|
||||
}
|
||||
@ -189,7 +186,7 @@ func (p *HTTPPool) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
key := parts[1]
|
||||
|
||||
// Fetch the value for this group/key.
|
||||
group := GetGroupWithWorkspace(p.ws, groupName)
|
||||
group := GetGroup(groupName)
|
||||
if group == nil {
|
||||
http.Error(w, "no such group: "+groupName, http.StatusNotFound)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user