func storeServer()

in service/main.go [73:85]


func storeServer(store store.Store) http.HandlerFunc {
	return func(resp http.ResponseWriter, req *http.Request) {
		key := req.URL.Path
		got, err := store.Get(key)
		if err != nil {
			log.Printf("unable to fetch from store for path %s and host %s: %v", req.URL.Path, req.Host, err)
			statusNotFound(resp)
		}

		_, name := path.Split(key)
		http.ServeContent(resp, req, name, time.Time{}, bytes.NewReader(got))
	}
}