mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-12 03:28:10 -07:00
transactions, connpools, misc
This commit is contained in:
+3
-3
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user