service

package
v0.0.0-...-e0770a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 50 Imported by: 0

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",
}

Functions

func EsPut

func EsPut(url string, data []byte) (err error)

func Init

func Init()

func InitConfig

func InitConfig()

func InitEs

func InitEs()

func InitServer

func InitServer()

func InitWorker

func InitWorker()

func NewServer

func NewServer() *webServer

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

type ClientCollection

type ClientCollection struct {
	sync.Mutex
	// contains filtered or unexported fields
}

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 Count

type Count struct {
	// contains filtered or unexported fields
}
type Link struct {
	Conn         *grpc.ClientConn
	Addr         string
	LinkPostChan chan torrent.TData
}

type Server

type Server struct {
	Nodes       []string
	Tool        Tool
	RedisClient *redis.Client
	// contains filtered or unexported fields
}

func NewSniffer

func NewSniffer() *Server

NewSniffer :NewSniffer

func (*Server) CheckSpeed

func (m *Server) CheckSpeed()

func (*Server) NewServerConn

func (m *Server) NewServerConn()

func (*Server) PrintLog

func (m *Server) PrintLog()

func (*Server) Refresh

func (m *Server) Refresh()

type Tool

type Tool struct {
	torrent.RPCServer
	Links        []Link
	ToolSendChan chan torrent.TData
	ToolRevChan  chan torrent.TData
}

func NewTool

func NewTool() *Tool

func (*Tool) Connect

func (m *Tool) Connect(i int)

func (*Tool) LinksServe

func (m *Tool) LinksServe()

func (*Tool) MessageStream

func (m *Tool) MessageStream(stream torrent.RPC_MessageStreamServer) error

func (*Tool) SendData

func (m *Tool) SendData(postData torrent.TData) string

func (*Tool) ToolServer

func (m *Tool) ToolServer(toolServer *Tool)

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) FindNode

func (m *Worker) FindNode()

func (*Worker) GenerNodes

func (m *Worker) GenerNodes()

func (*Worker) HandleMsg

func (m *Worker) HandleMsg()

func (*Worker) Metadata

func (m *Worker) Metadata()

func (*Worker) PrintLog

func (m *Worker) PrintLog()

func (*Worker) Refresh

func (m *Worker) Refresh()

func (*Worker) Server

func (m *Worker) Server()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL