22 lines
401 B
Go
22 lines
401 B
Go
package steamcache
|
|
|
|
import "net/http"
|
|
|
|
type SteamCache struct {
|
|
}
|
|
|
|
func New() *SteamCache {
|
|
return &SteamCache{}
|
|
}
|
|
|
|
func (sc *SteamCache) Run() {
|
|
http.ListenAndServe(":8080", sc)
|
|
}
|
|
|
|
func (sc *SteamCache) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|
//TODO: proxy request to steam servers and cache the response
|
|
|
|
// for now, just return a simple response
|
|
w.Write([]byte("Hello, World!"))
|
|
}
|