docs, signatures; glog for main; config.New()

This commit is contained in:
Jimmy Zelinskie
2014-06-24 03:59:30 -04:00
parent 3c01900c69
commit 42693e2a3b
11 changed files with 125 additions and 115 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ import (
type driver struct{}
func (d *driver) New(conf *config.DataStore) tracker.Pool {
func (d *driver) New(conf *config.DriverConfig) tracker.Pool {
return &Pool{
users: make(map[string]*models.User),
torrents: make(map[string]*models.Torrent),
+2 -2
View File
@@ -30,7 +30,7 @@ var (
// Driver represents an interface to pool of connections to models used for
// the tracker.
type Driver interface {
New(*config.DataStore) Pool
New(*config.DriverConfig) Pool
}
// Register makes a database driver available by the provided name.
@@ -47,7 +47,7 @@ func Register(name string, driver Driver) {
}
// Open creates a pool of data store connections specified by a models configuration.
func Open(conf *config.DataStore) (Pool, error) {
func Open(conf *config.DriverConfig) (Pool, error) {
driver, ok := drivers[conf.Driver]
if !ok {
return nil, fmt.Errorf(