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

View File

@@ -8,7 +8,6 @@ import (
"net"
"github.com/chihaya/chihaya"
"github.com/chihaya/chihaya/config"
"github.com/chihaya/chihaya/server/store"
"github.com/chihaya/chihaya/tracker"
)
@@ -24,7 +23,7 @@ var ErrBlockedIP = tracker.ClientError("disallowed IP address")
// blacklistAnnounceIP provides a middleware that only allows IPs to announce
// that are not stored in an IPStore.
func blacklistAnnounceIP(next tracker.AnnounceHandler) tracker.AnnounceHandler {
return func(cfg *config.TrackerConfig, req *chihaya.AnnounceRequest, resp *chihaya.AnnounceResponse) (err error) {
return func(cfg *chihaya.TrackerConfig, req *chihaya.AnnounceRequest, resp *chihaya.AnnounceResponse) (err error) {
blacklisted := false
storage := store.MustGetStore()

View File

@@ -8,7 +8,6 @@ import (
"net"
"github.com/chihaya/chihaya"
"github.com/chihaya/chihaya/config"
"github.com/chihaya/chihaya/server/store"
"github.com/chihaya/chihaya/tracker"
)
@@ -20,7 +19,7 @@ func init() {
// whitelistAnnounceIP provides a middleware that only allows IPs to announce
// that are stored in an IPStore.
func whitelistAnnounceIP(next tracker.AnnounceHandler) tracker.AnnounceHandler {
return func(cfg *config.TrackerConfig, req *chihaya.AnnounceRequest, resp *chihaya.AnnounceResponse) (err error) {
return func(cfg *chihaya.TrackerConfig, req *chihaya.AnnounceRequest, resp *chihaya.AnnounceResponse) (err error) {
whitelisted := false
storage := store.MustGetStore()