diff options
author | Joey Hess <joeyh@joeyh.name> | 2014-12-08 19:14:24 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2014-12-08 19:15:07 -0400 |
commit | 929de31900dbc9654e0bcc1f4679f526aee7f99a (patch) | |
tree | d868a3bbae9a0af26191f461f317f6d40b08a2af /doc/design/external_special_remote_protocol.mdwn | |
parent | 28764ce2dc29d1d93989b4061b5b12bac10902de (diff) |
Urls can now be claimed by remotes. This will allow creating, for example, a external special remote that handles magnet: and *.torrent urls.
Diffstat (limited to 'doc/design/external_special_remote_protocol.mdwn')
-rw-r--r-- | doc/design/external_special_remote_protocol.mdwn | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/doc/design/external_special_remote_protocol.mdwn b/doc/design/external_special_remote_protocol.mdwn index 332cc37b1..6c06fd902 100644 --- a/doc/design/external_special_remote_protocol.mdwn +++ b/doc/design/external_special_remote_protocol.mdwn @@ -125,10 +125,16 @@ replying with `UNSUPPORTED-REQUEST` is acceptable. If the remote replies with `UNSUPPORTED-REQUEST`, its availability is assumed to be global. So, only remotes that are only reachable locally need to worry about implementing this. -* `CLAIMURL Value` +* `CLAIMURL Url` Asks the remote if it wishes to claim responsibility for downloading an url. If so, the remote should send back an `CLAIMURL-SUCCESS` reply. If not, it can send `CLAIMURL-FAILURE`. +* `CHECKURL Url` + Asks the remote to check if the url's content can currently be downloaded + (without downloading it). If the url is not accessible, send + `CHECKURL-FAILURE`. If the url is accessible and the size is known, + send the size in `CHECKURL-SIZE`. If the url is accessible, but the size + is unknown, send `CHECKURL-SIZEUNOWN`. More optional requests may be added, without changing the protocol version, so if an unknown request is seen, reply with `UNSUPPORTED-REQUEST`. @@ -175,6 +181,14 @@ while it's handling a request. Indicates that the CLAIMURL url will be handled by this remote. * `CLAIMURL-FAILURE` Indicates that the CLAIMURL url wil not be handled by this remote. +* `CHECKURL-SIZE Size` + Indicates that the requested url has been verified to exist, + and its size is known. The size is in bytes. +* `CHECKURL-SIZEUNKNOWN` + Indicates that the requested url has been verified to exist, + but its size could not be determined. +* `CHECKURL-FAILURE` + Indicates that the requested url could not be accessed. * `UNSUPPORTED-REQUEST` Indicates that the special remote does not know how to handle a request. @@ -255,14 +269,14 @@ in control. * `GETSTATE Key` Gets any state that has been stored for the key. (git-annex replies with VALUE followed by the state.) -* `SETURLPRESENT Key Value` +* `SETURLPRESENT Key Url` Records an url (or uri) where the Key can be downloaded from. -* `SETURLMISSING Key Value` +* `SETURLMISSING Key Url` Records that the key can no longer be downloaded from the specified url (or uri). -* `GETURLS Key Value` +* `GETURLS Key Prefix` Gets the recorded urls where a Key can be downloaded from. - Only urls that start with the Value will be returned. The Value + Only urls that start with the Prefix will be returned. The Prefix may be empty to get all urls. (git-annex replies one or more times with VALUE for each url. The final VALUE has an empty value, indicating the end of the url list.) |