mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-28 18:18:11 -07:00
Rename to MoChi
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Package memory implements the storage interface for a Chihaya
|
||||
// Package memory implements the storage interface for a Conf
|
||||
// BitTorrent tracker keeping peer data in memory.
|
||||
package memory
|
||||
|
||||
@@ -12,14 +12,14 @@ import (
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/chihaya/chihaya/bittorrent"
|
||||
"github.com/chihaya/chihaya/pkg/log"
|
||||
"github.com/chihaya/chihaya/pkg/stop"
|
||||
"github.com/chihaya/chihaya/pkg/timecache"
|
||||
"github.com/chihaya/chihaya/storage"
|
||||
"github.com/sot-tech/mochi/bittorrent"
|
||||
"github.com/sot-tech/mochi/pkg/log"
|
||||
"github.com/sot-tech/mochi/pkg/stop"
|
||||
"github.com/sot-tech/mochi/pkg/timecache"
|
||||
"github.com/sot-tech/mochi/storage"
|
||||
)
|
||||
|
||||
// Name is the name by which this peer store is registered with Chihaya.
|
||||
// Name is the name by which this peer store is registered with Conf.
|
||||
const Name = "memory"
|
||||
|
||||
// Default config constants.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package memory
|
||||
|
||||
import (
|
||||
"github.com/chihaya/chihaya/storage"
|
||||
"github.com/chihaya/chihaya/storage/test"
|
||||
"github.com/sot-tech/mochi/storage"
|
||||
"github.com/sot-tech/mochi/storage/test"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package storage
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"github.com/chihaya/chihaya/bittorrent"
|
||||
"github.com/sot-tech/mochi/bittorrent"
|
||||
"net"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Package redis implements the storage interface for a Chihaya
|
||||
// Package redis implements the storage interface for a Conf
|
||||
// BitTorrent tracker keeping peer data in redis with hash.
|
||||
// There two categories of hash:
|
||||
//
|
||||
@@ -32,14 +32,14 @@ import (
|
||||
"github.com/gomodule/redigo/redis"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/chihaya/chihaya/bittorrent"
|
||||
"github.com/chihaya/chihaya/pkg/log"
|
||||
"github.com/chihaya/chihaya/pkg/stop"
|
||||
"github.com/chihaya/chihaya/pkg/timecache"
|
||||
"github.com/chihaya/chihaya/storage"
|
||||
"github.com/sot-tech/mochi/bittorrent"
|
||||
"github.com/sot-tech/mochi/pkg/log"
|
||||
"github.com/sot-tech/mochi/pkg/stop"
|
||||
"github.com/sot-tech/mochi/pkg/timecache"
|
||||
"github.com/sot-tech/mochi/storage"
|
||||
)
|
||||
|
||||
// Name is the name by which this peer store is registered with Chihaya.
|
||||
// Name is the name by which this peer store is registered with Conf.
|
||||
const Name = "redis"
|
||||
|
||||
// Default config constants.
|
||||
@@ -850,7 +850,7 @@ func (ps *store) Stop() stop.Result {
|
||||
go func() {
|
||||
close(ps.closed)
|
||||
ps.wg.Wait()
|
||||
log.Info("storage: exiting. chihaya does not clear data in redis when exiting. chihaya keys have prefix 'IPv{4,6}_'.")
|
||||
log.Info("storage: exiting. mochi does not clear data in redis when exiting. mochi keys have prefix 'IPv{4,6}_'.")
|
||||
c.Done()
|
||||
}()
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/alicebob/miniredis"
|
||||
s "github.com/chihaya/chihaya/storage"
|
||||
"github.com/chihaya/chihaya/storage/test"
|
||||
s "github.com/sot-tech/mochi/storage"
|
||||
"github.com/sot-tech/mochi/storage/test"
|
||||
)
|
||||
|
||||
func createNew() s.Storage {
|
||||
|
||||
+3
-3
@@ -4,9 +4,9 @@ import (
|
||||
"errors"
|
||||
"sync"
|
||||
|
||||
"github.com/chihaya/chihaya/bittorrent"
|
||||
"github.com/chihaya/chihaya/pkg/log"
|
||||
"github.com/chihaya/chihaya/pkg/stop"
|
||||
"github.com/sot-tech/mochi/bittorrent"
|
||||
"github.com/sot-tech/mochi/pkg/log"
|
||||
"github.com/sot-tech/mochi/pkg/stop"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"github.com/chihaya/chihaya/bittorrent"
|
||||
"github.com/chihaya/chihaya/storage"
|
||||
"github.com/sot-tech/mochi/bittorrent"
|
||||
"github.com/sot-tech/mochi/storage"
|
||||
"math/rand"
|
||||
"net"
|
||||
"runtime"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"github.com/chihaya/chihaya/bittorrent"
|
||||
"github.com/chihaya/chihaya/storage"
|
||||
"github.com/sot-tech/mochi/bittorrent"
|
||||
"github.com/sot-tech/mochi/storage"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"github.com/chihaya/chihaya/bittorrent"
|
||||
"github.com/sot-tech/mochi/bittorrent"
|
||||
"net"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user