Documentation ¶
Index ¶
- func NewWorker(ctx context.Context) swarm.Swarm
- type Worker
- func (m *Worker) Bootstrap() (e error)
- func (*Worker) ForceReannounce(string) error
- func (*Worker) GetConnectedWorkers() (_ map[string]*swarm.SwarmWorker)
- func (*Worker) IsMaster() bool
- func (*Worker) RemoveTorrent(string, string, string, ...bool) (uint64, uint64, error)
- func (*Worker) RequestFreeSpaceFromWorker(string) (uint64, error)
- func (*Worker) RequestTorrentsFromWorker(string) ([]*deluge.Torrent, error)
- func (*Worker) SaveTorrentFile(string, string, *[]byte) (int64, error)
- type WorkerService
- func (m *WorkerService) DropTorrent(ctx context.Context, req *pb.TorrentDropRequest) (_ *pb.TorrentDropReply, _ error)
- func (m *WorkerService) ForceReannounce(ctx context.Context, _ *emptypb.Empty) (_ *emptypb.Empty, e error)
- func (m *WorkerService) GetSystemFreeSpace(ctx context.Context, _ *emptypb.Empty) (_ *pb.SystemSpaceReply, _ error)
- func (m *WorkerService) GetTorrentScore(ctx context.Context, req *pb.TorrentScoreRequest) (_ *pb.TorrentScoreReply, _ error)
- func (m *WorkerService) GetTorrents(ctx context.Context, _ *emptypb.Empty) (_ *pb.TorrentsReply, _ error)
- func (m *WorkerService) Init(ctx context.Context, _ *emptypb.Empty) (*pb.InitReply, error)
- func (*WorkerService) Ping(_ context.Context, _ *emptypb.Empty) (_ *emptypb.Empty, _ error)
- func (m *WorkerService) SaveTorrentFile(ctx context.Context, req *pb.TFileSaveRequest) (_ *pb.TFileSaveReply, _ error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Worker ¶
type Worker struct { Version string WDFreeSpace uint64 Torrents map[string]*deluge.Torrent // contains filtered or unexported fields }
func (*Worker) ForceReannounce ¶
func (*Worker) GetConnectedWorkers ¶
func (*Worker) GetConnectedWorkers() (_ map[string]*swarm.SwarmWorker)
func (*Worker) RemoveTorrent ¶
func (*Worker) RequestFreeSpaceFromWorker ¶
func (*Worker) RequestTorrentsFromWorker ¶
type WorkerService ¶
type WorkerService struct { pb.UnimplementedWorkerServiceServer // contains filtered or unexported fields }
func NewWorkerService ¶
func NewWorkerService(w *Worker) *WorkerService
func (*WorkerService) DropTorrent ¶
func (m *WorkerService) DropTorrent(ctx context.Context, req *pb.TorrentDropRequest) (_ *pb.TorrentDropReply, _ error)
func (*WorkerService) ForceReannounce ¶
func (*WorkerService) GetSystemFreeSpace ¶
func (m *WorkerService) GetSystemFreeSpace(ctx context.Context, _ *emptypb.Empty) (_ *pb.SystemSpaceReply, _ error)
func (*WorkerService) GetTorrentScore ¶
func (m *WorkerService) GetTorrentScore(ctx context.Context, req *pb.TorrentScoreRequest) (_ *pb.TorrentScoreReply, _ error)
func (*WorkerService) GetTorrents ¶
func (m *WorkerService) GetTorrents(ctx context.Context, _ *emptypb.Empty) (_ *pb.TorrentsReply, _ error)
func (*WorkerService) SaveTorrentFile ¶
func (m *WorkerService) SaveTorrentFile(ctx context.Context, req *pb.TFileSaveRequest) (_ *pb.TFileSaveReply, _ error)
Click to show internal directories.
Click to hide internal directories.