angelos.lib.replication.handler

Replication handlers. The replication handlers contains the actual protocol logic and handles the reading/writing and interpretation of replicator packets.

class angelos.lib.replication.handler.Actions

Bases: object

CLI_CREATE = 'client-create'
CLI_DELETE = 'client-delete'
CLI_UPDATE = 'client-update'
NO_ACTION = 'no-action'
SER_CREATE = 'server-create'
SER_DELETE = 'server-delete'
SER_UPDATE = 'server-update'
class angelos.lib.replication.handler.PacketProcessor

Bases: object

send()
wait()
class angelos.lib.replication.handler.Packets(value)

Bases: enum.IntEnum

An enumeration.

RPL_ABORT = 16
RPL_CHUNK = 11
RPL_CLOSE = 15
RPL_CONFIRM = 4
RPL_DONE = 7
RPL_DOWNLOAD = 9
RPL_GET = 10
RPL_INIT = 1
RPL_OPERATION = 3
RPL_PUT = 13
RPL_RECEIVED = 14
RPL_REQUEST = 5
RPL_RESPONSE = 6
RPL_SYNC = 8
RPL_UPLOAD = 12
RPL_VERSION = 2
class angelos.lib.replication.handler.ReplicatorClientHandler(client, reader, writer)

Bases: angelos.lib.replication.handler.ReplicatorHandler

property client

Property access to the client.

delete() → bool
download() → bool
exit()
pull()

Synchronize using pull from the server.

push()

Synchronize using push to the server.

start()

Start a new replication operation.

upload() → bool
wait_closed()
class angelos.lib.replication.handler.ReplicatorHandler(reader, writer)

Bases: asyncssh.packet.SSHPacketHandler

Packet handler baseclass for the replicator.

handle_packet(handlers: dict) -> (typing.Any, <class 'int'>)
property logger

The logger associated with this packet handler

recv_packet()

Receive a Replicator packet.

recv_packets()

Receive and process Replicator packets.

send_packet(pkttype, pktid, *args)

Send a Replicator packet.

class angelos.lib.replication.handler.ReplicatorServerHandler(server, reader, writer)

Bases: angelos.lib.replication.handler.ReplicatorHandler

An SFTP server session handler

delete() → bool
downloading()
pulled()
pushed(c_fileinfo: angelos.lib.replication.preset.FileSyncInfo)
run()

Replication server handler entry-point.

uploading()