Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BootstrappingNodes = []string{
"9.rarbg.to:2710",
"9.rarbg.me:2710",
"open.demonii.com:1337",
"tracker.opentrackr.org:1337",
"p4p.arenabg.com:1337",
"router.utorrent.com:6881",
"router.bittorrent.com:6881",
"dht.transmissionbt.com:6881",
}
View Source
var ES *elasticsearch.Client
Functions ¶
func InitConfig ¶
func InitConfig()
func InitServer ¶
func InitServer()
func InitWorker ¶
func InitWorker()
Types ¶
type ClientCollection ¶
func NewClientCollection ¶
func NewClientCollection() *ClientCollection
type Config ¶
type Config struct {
EsUsername string `env:"EsUsername"`
EsPassWord string `env:"EsPassWord"`
HotSearchOnePageSize int `env:"HotSearchOnePageSize" envDefault:"6"`
HotSearchPageSize int `env:"HotSearchPageSize" envDefault:"3"`
AuthDataBase string `env:"AuthDataBase"`
EnableElasticsearch bool `env:"EnableElasticsearch"`
EsURL string `env:"EsURL"`
EsUrlBase string `env:"EsUrlBase"`
WebServerAddr string `env:"WebServerAddr"`
}
var (
ConfigData *Config
)
type Server ¶
type Server struct {
Nodes []string
Tool Tool
RedisClient *redis.Client
// contains filtered or unexported fields
}
func (*Server) CheckSpeed ¶
func (m *Server) CheckSpeed()
func (*Server) NewServerConn ¶
func (m *Server) NewServerConn()
type Tool ¶
type Tool struct {
torrent.RPCServer
Links []Link
ToolSendChan chan torrent.TData
ToolRevChan chan torrent.TData
}
func (*Tool) LinksServe ¶
func (m *Tool) LinksServe()
func (*Tool) MessageStream ¶
func (m *Tool) MessageStream(stream torrent.RPC_MessageStreamServer) error
func (*Tool) ToolServer ¶
type Worker ¶
type Worker struct {
Tool Tool
// contains filtered or unexported fields
}
func NewWorkerServer ¶
func NewWorkerServer() *Worker
func (*Worker) AutoSendFindNode ¶
func (m *Worker) AutoSendFindNode()
func (*Worker) GenerNodes ¶
func (m *Worker) GenerNodes()
Click to show internal directories.
Click to hide internal directories.