initial redis work, storage.Storage->storage.Conn,

among other new options in the config file for storage timeouts
This commit is contained in:
Jimmy Zelinskie
2013-06-24 14:18:32 -04:00
parent 79a6c79067
commit 56132e3d64
5 changed files with 60 additions and 10 deletions
+3 -3
View File
@@ -25,7 +25,7 @@ import (
type Server struct {
conf *config.Config
listener net.Listener
storage storage.Storage
storage storage.Conn
serving bool
startTime time.Time
@@ -39,7 +39,7 @@ type Server struct {
}
func New(conf *config.Config) (*Server, error) {
store, err := storage.New(&conf.Storage)
store, err := storage.Open(&conf.Storage)
if err != nil {
return nil, err
}
@@ -129,7 +129,7 @@ func fail(err error, w http.ResponseWriter, r *http.Request) {
w.(http.Flusher).Flush()
}
func validatePasskey(dir string, s storage.Storage) (*storage.User, error) {
func validatePasskey(dir string, s storage.Conn) (*storage.User, error) {
if len(dir) != 34 {
return nil, errors.New("Your passkey is invalid")
}