remove config package

This commit is contained in:
Jimmy Zelinskie
2016-03-02 20:18:55 -05:00
parent 47f85ec961
commit 0dfc26caea
16 changed files with 129 additions and 123 deletions
+3 -3
View File
@@ -12,14 +12,14 @@ package server
import (
"fmt"
"github.com/chihaya/chihaya/config"
"github.com/chihaya/chihaya"
"github.com/chihaya/chihaya/tracker"
)
var constructors = make(map[string]Constructor)
// Constructor is a function that creates a new Server.
type Constructor func(*config.ServerConfig, *tracker.Tracker) (Server, error)
type Constructor func(*chihaya.ServerConfig, *tracker.Tracker) (Server, error)
// Register makes a Constructor available by the provided name.
//
@@ -36,7 +36,7 @@ func Register(name string, con Constructor) {
}
// New creates a Server specified by a configuration.
func New(cfg *config.ServerConfig, tkr *tracker.Tracker) (Server, error) {
func New(cfg *chihaya.ServerConfig, tkr *tracker.Tracker) (Server, error) {
con, ok := constructors[cfg.Name]
if !ok {
return nil, fmt.Errorf(