Documentation ¶
Overview ¶
Package rpc handles the rpc communication with the aria2 dameon
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertClosedNetworkConnectionError ¶
ConvertClosedNetworkConnectionError converts a TCP "closed network connection" error to a argo.ErrConnIsClosed
Types ¶
type Adapter ¶
Adapter fulfills the argo.Caller interface, while allowing to choose a custom Poster and a secret tocken
type Notification ¶
type Notification struct { // JSON-RPC protocol. Version string `json:"jsonrpc"` // A String containing the name of the method to be invoked. Method string `json:"method"` // Object to pass as request parameter to the method. Params []struct { GID argo.GID `json:"gid"` // GID of the download } `json:"params"` }
Notification from aria2
func (Notification) GID ¶
func (r Notification) GID() []argo.GID
GID gathers the GID of the notification
func (Notification) Identifier ¶
func (r Notification) Identifier() string
Identifier returns the rpc method
type Request ¶
type Request struct { // JSON-RPC protocol. Version string `json:"jsonrpc"` // A String containing the name of the method to be invoked. Method string `json:"method"` // Object to pass as request parameter to the method. Params interface{} `json:"params"` // The request id. This can be of any type. It is used to match the // response with the request that it is replying to. ID string `json:"id"` }
Request represents a JSON-RPC request sent by a client.
type Response ¶
type Response struct { Result json.RawMessage `json:"result"` ID string `json:"id"` Error argo.ResponseError }
Response represents a JSON-RPC response to a request
Directories ¶
Path | Synopsis |
---|---|
Package http implements http communication with the aria2 daemon
|
Package http implements http communication with the aria2 daemon |
Package websocket implements websocket communication with the aria2 daemon
|
Package websocket implements websocket communication with the aria2 daemon |
Click to show internal directories.
Click to hide internal directories.