rename frontends to frontend
This commit is contained in:
parent
88567d5b2e
commit
ae18d89627
20 changed files with 13 additions and 13 deletions
|
@ -20,7 +20,7 @@ package backend
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jzelinskie/trakr/frontends"
|
"github.com/jzelinskie/trakr/frontend"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GenericConfig is a block of configuration who's structure is unknown.
|
// 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.
|
// Backend is a multi-protocol, customizable BitTorrent Tracker.
|
||||||
type Backend struct {
|
type Backend struct {
|
||||||
TrackerFuncs frontends.TrackerFuncs
|
TrackerFuncs frontend.TrackerFuncs
|
||||||
peerStore PeerStore
|
peerStore PeerStore
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,8 @@ import (
|
||||||
|
|
||||||
"github.com/jzelinskie/trakr/backend"
|
"github.com/jzelinskie/trakr/backend"
|
||||||
|
|
||||||
httpfrontend "github.com/jzelinskie/trakr/frontends/http"
|
httpfrontend "github.com/jzelinskie/trakr/frontend/http"
|
||||||
udpfrontend "github.com/jzelinskie/trakr/frontends/udp"
|
udpfrontend "github.com/jzelinskie/trakr/frontend/udp"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ConfigFile struct {
|
type ConfigFile struct {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package frontends
|
package frontend
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/jzelinskie/trakr/bittorrent"
|
"github.com/jzelinskie/trakr/bittorrent"
|
|
@ -26,7 +26,7 @@ import (
|
||||||
"github.com/tylerb/graceful"
|
"github.com/tylerb/graceful"
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
|
|
||||||
"github.com/jzelinskie/trakr/frontends"
|
"github.com/jzelinskie/trakr/frontend"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -71,12 +71,12 @@ type Config struct {
|
||||||
type Frontend struct {
|
type Frontend struct {
|
||||||
grace *graceful.Server
|
grace *graceful.Server
|
||||||
|
|
||||||
frontends.TrackerFuncs
|
frontend.TrackerFuncs
|
||||||
Config
|
Config
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFrontend allocates a new instance of a Frontend.
|
// 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{
|
return &Frontend{
|
||||||
TrackerFuncs: funcs,
|
TrackerFuncs: funcs,
|
||||||
Config: cfg,
|
Config: cfg,
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/jzelinskie/trakr/bittorrent"
|
"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.
|
// WriteError communicates an error to a BitTorrent client over HTTP.
|
|
@ -28,8 +28,8 @@ import (
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
|
|
||||||
"github.com/jzelinskie/trakr/bittorrent"
|
"github.com/jzelinskie/trakr/bittorrent"
|
||||||
"github.com/jzelinskie/trakr/frontends"
|
"github.com/jzelinskie/trakr/frontend"
|
||||||
"github.com/jzelinskie/trakr/frontends/udp/bytepool"
|
"github.com/jzelinskie/trakr/frontend/udp/bytepool"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -74,12 +74,12 @@ type Frontend struct {
|
||||||
closing chan struct{}
|
closing chan struct{}
|
||||||
wg sync.WaitGroup
|
wg sync.WaitGroup
|
||||||
|
|
||||||
frontends.TrackerFuncs
|
frontend.TrackerFuncs
|
||||||
Config
|
Config
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFrontend allocates a new instance of a Frontend.
|
// 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{
|
return &Frontend{
|
||||||
closing: make(chan struct{}),
|
closing: make(chan struct{}),
|
||||||
TrackerFuncs: funcs,
|
TrackerFuncs: funcs,
|
Loading…
Reference in a new issue