Separate tracker logic from the http package, step 1

This commit is contained in:
Justin Li
2014-07-17 00:09:56 -04:00
parent f8047ef8ab
commit da19ed3e21
21 changed files with 568 additions and 503 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ import (
"fmt"
"github.com/chihaya/chihaya/config"
"github.com/chihaya/chihaya/models"
"github.com/chihaya/chihaya/tracker/models"
)
var drivers = make(map[string]Driver)
@@ -35,7 +35,7 @@ func Register(name string, driver Driver) {
drivers[name] = driver
}
// Open creates a connection specified by a models configuration.
// Open creates a connection specified by a configuration.
func Open(cfg *config.DriverConfig) (Conn, error) {
driver, ok := drivers[cfg.Name]
if !ok {
+1 -1
View File
@@ -9,7 +9,7 @@ package noop
import (
"github.com/chihaya/chihaya/config"
"github.com/chihaya/chihaya/drivers/backend"
"github.com/chihaya/chihaya/models"
"github.com/chihaya/chihaya/tracker/models"
)
type driver struct{}