rename frontends to frontend

This commit is contained in:
Leo Balduf 2016-08-09 15:01:36 -04:00 committed by Jimmy Zelinskie
parent 88567d5b2e
commit ae18d89627
20 changed files with 13 additions and 13 deletions

View file

@ -20,7 +20,7 @@ package backend
import (
"time"
"github.com/jzelinskie/trakr/frontends"
"github.com/jzelinskie/trakr/frontend"
)
// GenericConfig is a block of configuration who's structure is unknown.
@ -42,6 +42,6 @@ func New(config BackendConfig, peerStore PeerStore) (*Backend, error) {
// Backend is a multi-protocol, customizable BitTorrent Tracker.
type Backend struct {
TrackerFuncs frontends.TrackerFuncs
TrackerFuncs frontend.TrackerFuncs
peerStore PeerStore
}

View file

@ -16,8 +16,8 @@ import (
"github.com/jzelinskie/trakr/backend"
httpfrontend "github.com/jzelinskie/trakr/frontends/http"
udpfrontend "github.com/jzelinskie/trakr/frontends/udp"
httpfrontend "github.com/jzelinskie/trakr/frontend/http"
udpfrontend "github.com/jzelinskie/trakr/frontend/udp"
)
type ConfigFile struct {

View file

@ -1,4 +1,4 @@
package frontends
package frontend
import (
"github.com/jzelinskie/trakr/bittorrent"

View file

@ -26,7 +26,7 @@ import (
"github.com/tylerb/graceful"
"golang.org/x/net/context"
"github.com/jzelinskie/trakr/frontends"
"github.com/jzelinskie/trakr/frontend"
)
func init() {
@ -71,12 +71,12 @@ type Config struct {
type Frontend struct {
grace *graceful.Server
frontends.TrackerFuncs
frontend.TrackerFuncs
Config
}
// NewFrontend allocates a new instance of a Frontend.
func NewFrontend(funcs frontends.TrackerFuncs, cfg Config) *Frontend {
func NewFrontend(funcs frontend.TrackerFuncs, cfg Config) *Frontend {
return &Frontend{
TrackerFuncs: funcs,
Config: cfg,

View file

@ -18,7 +18,7 @@ import (
"net/http"
"github.com/jzelinskie/trakr/bittorrent"
"github.com/jzelinskie/trakr/frontends/http/bencode"
"github.com/jzelinskie/trakr/frontend/http/bencode"
)
// WriteError communicates an error to a BitTorrent client over HTTP.

View file

@ -28,8 +28,8 @@ import (
"golang.org/x/net/context"
"github.com/jzelinskie/trakr/bittorrent"
"github.com/jzelinskie/trakr/frontends"
"github.com/jzelinskie/trakr/frontends/udp/bytepool"
"github.com/jzelinskie/trakr/frontend"
"github.com/jzelinskie/trakr/frontend/udp/bytepool"
)
func init() {
@ -74,12 +74,12 @@ type Frontend struct {
closing chan struct{}
wg sync.WaitGroup
frontends.TrackerFuncs
frontend.TrackerFuncs
Config
}
// NewFrontend allocates a new instance of a Frontend.
func NewFrontend(funcs frontends.TrackerFuncs, cfg Config) *Frontend {
func NewFrontend(funcs frontend.TrackerFuncs, cfg Config) *Frontend {
return &Frontend{
closing: make(chan struct{}),
TrackerFuncs: funcs,