Object¶
Object Auditor¶
Object Backend¶
Object Replicator¶
-
class
swift.obj.ssync_sender.Sender(daemon, node, job, suffixes, remote_check_objs=None)¶ Bases:
objectSends SSYNC requests to the object server.
These requests are eventually handled by
ssync_receiverand full documentation about the process is there.-
connect()¶ Establishes a connection and starts an SSYNC request with the object server.
-
disconnect()¶ Closes down the connection to the object server once done with the SSYNC request.
-
missing_check()¶ Handles the sender-side of the MISSING_CHECK step of a SSYNC request.
Full documentation of this can be found at
Receiver.missing_check().
-
readline()¶ Reads a line from the SSYNC response body.
httplib has no readline and will block on read(x) until x is read, so we have to do the work ourselves. A bit of this is taken from Python’s httplib itself.
-
send_delete(url_path, timestamp)¶ Sends a DELETE subrequest with the given information.
-
send_post(url_path, df)¶
-
send_put(url_path, df)¶ Sends a PUT subrequest for the url_path using the source df (DiskFile) and content_length.
-
updates()¶ Handles the sender-side of the UPDATES step of an SSYNC request.
Full documentation of this can be found at
Receiver.updates().
-
-
swift.obj.ssync_sender.decode_wanted(parts)¶ Parse missing_check line parts to determine which parts of local diskfile were wanted by the receiver.
The encoder for parts is
encode_wanted()
-
swift.obj.ssync_sender.encode_missing(object_hash, ts_data, ts_meta=None, ts_ctype=None)¶ Returns a string representing the object hash, its data file timestamp and the delta forwards to its metafile and content-type timestamps, if non-zero, in the form:
<hash> <ts_data> [m:<hex delta to ts_meta>[,t:<hex delta to ts_ctype>]]The decoder for this line is
decode_missing()