mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
Rename mc -> beacon
This commit is contained in:
parent
3e34fc66e6
commit
adbd0b1834
@ -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
|
@ -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
|
||||
)
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user