rename to tools directory

This commit is contained in:
Damien Robichaud
2019-08-16 09:47:36 -07:00
parent fe45157b26
commit d3022ccd65
13 changed files with 4 additions and 5 deletions

View File

@@ -0,0 +1,19 @@
package httpclient
import (
"net/http"
"time"
"github.com/gomodule/redigo/redis"
"github.com/gregjones/httpcache"
redis_cache "github.com/gregjones/httpcache/redis"
)
func NewClient(conn redis.Conn) *http.Client {
etagCache := redis_cache.NewWithClient(conn)
tr := httpcache.NewTransport(etagCache)
return &http.Client{
Transport: tr,
Timeout: 10 * time.Second,
}
}