transactions, connpools, misc

This commit is contained in:
Jimmy Zelinskie
2013-07-03 18:24:03 -04:00
parent 5848a7a8d8
commit 279c78192f
7 changed files with 123 additions and 84 deletions
+3 -3
View File
@@ -25,7 +25,7 @@ import (
type Server struct {
conf *config.Config
listener net.Listener
storage storage.Conn
connPool storage.Pool
serving bool
startTime time.Time
@@ -39,14 +39,14 @@ type Server struct {
}
func New(conf *config.Config) (*Server, error) {
store, err := storage.Open(&conf.Storage)
pool, err := storage.Open(&conf.Storage)
if err != nil {
return nil, err
}
s := &Server{
conf: conf,
storage: store,
storage: pool,
Server: http.Server{
Addr: conf.Addr,
ReadTimeout: conf.ReadTimeout.Duration,