Rename mc -> beacon

This commit is contained in:
Jakob Borg 2014-05-15 00:29:18 -03:00
parent 3e34fc66e6
commit adbd0b1834
4 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
package mc
package beacon
import "net"
@ -20,7 +20,7 @@ type Beacon struct {
outbox chan recv
}
func NewBeacon(port int) (*Beacon, error) {
func New(port int) (*Beacon, error) {
conn, err := net.ListenUDP("udp", &net.UDPAddr{Port: port})
if err != nil {
return nil, err

View File

@ -1,4 +1,4 @@
package mc
package beacon
import (
"os"
@ -8,6 +8,6 @@ import (
)
var (
debug = strings.Contains(os.Getenv("STTRACE"), "mc") || os.Getenv("STTRACE") == "all"
debug = strings.Contains(os.Getenv("STTRACE"), "beacon") || os.Getenv("STTRACE") == "all"
l = logger.DefaultLogger
)

View File

@ -9,8 +9,8 @@ import (
"sync"
"time"
"github.com/calmh/syncthing/beacon"
"github.com/calmh/syncthing/buffers"
"github.com/calmh/syncthing/mc"
)
const (
@ -22,7 +22,7 @@ type Discoverer struct {
listenAddrs []string
localBcastIntv time.Duration
globalBcastIntv time.Duration
beacon *mc.Beacon
beacon *beacon.Beacon
registry map[string][]string
registryLock sync.RWMutex
extServer string
@ -43,7 +43,7 @@ var (
const maxErrors = 30
func NewDiscoverer(id string, addresses []string) (*Discoverer, error) {
b, err := mc.NewBeacon(21025)
b, err := beacon.New(21025)
if err != nil {
return nil, err
}