Documentation
¶
Overview ¶
Package rainrpc provides a RPC client implementation for communicating with Rain session.
Index ¶
- type AddTorrentRequest
- type AddTorrentResponse
- type AddURIRequest
- type AddURIResponse
- type Client
- func (c *Client) AddTorrent(f io.Reader) (*Torrent, error)
- func (c *Client) AddURI(uri string) (*Torrent, error)
- func (c *Client) Close() error
- func (c *Client) GetTorrentPeers(id string) ([]Peer, error)
- func (c *Client) GetTorrentStats(id string) (*Stats, error)
- func (c *Client) GetTorrentTrackers(id string) ([]Tracker, error)
- func (c *Client) ListTorrents() ([]Torrent, error)
- func (c *Client) RemoveTorrent(id string) error
- func (c *Client) StartTorrent(id string) error
- func (c *Client) StopTorrent(id string) error
- type GetTorrentPeersRequest
- type GetTorrentPeersResponse
- type GetTorrentStatsRequest
- type GetTorrentStatsResponse
- type GetTorrentTrackersRequest
- type GetTorrentTrackersResponse
- type ListTorrentsRequest
- type ListTorrentsResponse
- type Peer
- type RemoveTorrentRequest
- type RemoveTorrentResponse
- type StartTorrentRequest
- type StartTorrentResponse
- type Stats
- type StopTorrentRequest
- type StopTorrentResponse
- type Time
- type Torrent
- type Tracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddTorrentRequest ¶
type AddTorrentRequest struct {
Torrent string
}
type AddTorrentResponse ¶
type AddTorrentResponse struct {
Torrent Torrent
}
type AddURIRequest ¶
type AddURIRequest struct {
URI string
}
type AddURIResponse ¶
type AddURIResponse struct {
Torrent Torrent
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetTorrentTrackers ¶
func (*Client) ListTorrents ¶
func (*Client) RemoveTorrent ¶
func (*Client) StartTorrent ¶
func (*Client) StopTorrent ¶
type GetTorrentPeersRequest ¶
type GetTorrentPeersRequest struct {
ID string
}
type GetTorrentPeersResponse ¶
type GetTorrentPeersResponse struct {
Peers []Peer
}
type GetTorrentStatsRequest ¶
type GetTorrentStatsRequest struct {
ID string
}
type GetTorrentStatsResponse ¶
type GetTorrentStatsResponse struct {
Stats Stats
}
type GetTorrentTrackersRequest ¶
type GetTorrentTrackersRequest struct {
ID string
}
type GetTorrentTrackersResponse ¶
type GetTorrentTrackersResponse struct {
Trackers []Tracker
}
type ListTorrentsRequest ¶
type ListTorrentsRequest struct {
}
type ListTorrentsResponse ¶
type ListTorrentsResponse struct {
Torrents []Torrent
}
type RemoveTorrentRequest ¶
type RemoveTorrentRequest struct {
ID string
}
type RemoveTorrentResponse ¶
type RemoveTorrentResponse struct {
}
type StartTorrentRequest ¶
type StartTorrentRequest struct {
ID string
}
type StartTorrentResponse ¶
type StartTorrentResponse struct {
}
type Stats ¶
type Stats struct {
Status string
Error *string
Pieces struct {
Have uint32
Missing uint32
Available uint32
Total uint32
}
Bytes struct {
Complete int64
Incomplete int64
Total int64
Downloaded int64
Uploaded int64
Wasted int64
}
Peers struct {
Total int
Incoming int
Outgoing int
}
Handshakes struct {
Total int
Incoming int
Outgoing int
}
ReadyAddresses int
Downloads struct {
Total int
Running int
Snubbed int
Choked int
}
MetadataDownloads struct {
Total int
Snubbed int
Running int
}
Name string
Private bool
PieceLength uint32
}
type StopTorrentRequest ¶
type StopTorrentRequest struct {
ID string
}
type StopTorrentResponse ¶
type StopTorrentResponse struct {
}
Click to show internal directories.
Click to hide internal directories.