Capitalize type names to prepare for moving them to the top level package

This commit is contained in:
Soam Vasani
2016-09-09 14:39:31 -07:00
parent 67ce88ebcc
commit 796a9810a4
7 changed files with 31 additions and 31 deletions
+4 -4
View File
@@ -27,7 +27,7 @@ import (
type functionHandler struct {
fmap *functionServiceMap
poolManagerUrl string
function
Function
}
func (*functionHandler) getServiceForFunction() (*url.URL, error) {
@@ -35,20 +35,20 @@ func (*functionHandler) getServiceForFunction() (*url.URL, error) {
}
func (fh *functionHandler) handler(responseWriter http.ResponseWriter, request *http.Request) {
serviceUrl, err := fh.fmap.lookup(&fh.function)
serviceUrl, err := fh.fmap.lookup(&fh.Function)
if err != nil {
// Cache miss: request the Pool Manager to make a new service.
serviceUrl, poolErr := fh.getServiceForFunction()
if poolErr != nil {
// now we're really screwed
log.Printf("Failed to get service for function (%v,%v): %v",
fh.function.name, fh.function.uid, poolErr)
fh.Function.Name, fh.Function.Uid, poolErr)
responseWriter.WriteHeader(500) // TODO: make this smarter based on the actual error
return
}
// add it to the map
fh.fmap.assign(&fh.function, serviceUrl)
fh.fmap.assign(&fh.Function, serviceUrl)
}
// Proxy off our request to the serviceUrl, and send the response back.