initial storage reorganization

This commit is contained in:
Jimmy Zelinskie
2013-10-03 22:10:46 -04:00
parent 1335a43e7f
commit cf53f9554c
13 changed files with 29 additions and 29 deletions
+4 -4
View File
@@ -17,15 +17,15 @@ import (
"sync/atomic"
"time"
"github.com/pushrax/chihaya/cache"
"github.com/pushrax/chihaya/config"
"github.com/pushrax/chihaya/models"
"github.com/pushrax/chihaya/storage/tracker"
)
type Server struct {
conf *config.Config
listener net.Listener
dbConnPool cache.Pool
dbConnPool tracker.Pool
serving bool
startTime time.Time
@@ -41,7 +41,7 @@ type Server struct {
}
func New(conf *config.Config) (*Server, error) {
pool, err := cache.Open(&conf.Cache)
pool, err := tracker.Open(&conf.Cache)
if err != nil {
return nil, err
}
@@ -133,7 +133,7 @@ func fail(err error, w http.ResponseWriter, r *http.Request) {
w.(http.Flusher).Flush()
}
func validateUser(tx cache.Tx, dir string) (*models.User, error) {
func validateUser(tx tracker.Conn, dir string) (*models.User, error) {
if len(dir) != 34 {
return nil, errors.New("Passkey is invalid")
}
+2 -2
View File
@@ -13,8 +13,8 @@ import (
"github.com/pushrax/chihaya/config"
_ "github.com/pushrax/chihaya/cache/redis"
_ "github.com/pushrax/chihaya/storage/batter"
_ "github.com/pushrax/chihaya/storage/tracker/redis"
_ "github.com/pushrax/chihaya/storage/web/batter"
)
func newTestServer() (*Server, error) {