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 -2
View File
@@ -7,8 +7,9 @@ package http
import (
"time"
"github.com/chihaya/chihaya/config"
"gopkg.in/yaml.v2"
"github.com/chihaya/chihaya"
)
type httpConfig struct {
@@ -21,7 +22,7 @@ type httpConfig struct {
RealIPHeader string `yaml:"real_ip_header"`
}
func newHTTPConfig(srvcfg *config.ServerConfig) (*httpConfig, error) {
func newHTTPConfig(srvcfg *chihaya.ServerConfig) (*httpConfig, error) {
bytes, err := yaml.Marshal(srvcfg.Config)
if err != nil {
return nil, err
+2 -2
View File
@@ -13,7 +13,7 @@ import (
"github.com/julienschmidt/httprouter"
"github.com/tylerb/graceful"
"github.com/chihaya/chihaya/config"
"github.com/chihaya/chihaya"
"github.com/chihaya/chihaya/server"
"github.com/chihaya/chihaya/tracker"
)
@@ -22,7 +22,7 @@ func init() {
server.Register("http", constructor)
}
func constructor(srvcfg *config.ServerConfig, tkr *tracker.Tracker) (server.Server, error) {
func constructor(srvcfg *chihaya.ServerConfig, tkr *tracker.Tracker) (server.Server, error) {
cfg, err := newHTTPConfig(srvcfg)
if err != nil {
return nil, errors.New("http: invalid config: " + err.Error())