You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-06-23 00:07:44 +02:00
Prior to this the Perl remote was used to satisfy C requests. This worked fine but since the remote needed to be migrated to C anyway there was no reason to wait. Add the ProtocolServer object and tweak ProtocolClient to work with it. It was also necessary to add a mechanism to get option values from the remote so that encryption settings could be read and used in the storage object. Update the remote storage objects to comply with the protocol changes and add the storage protocol handler. Ideally this commit would have been broken up into smaller chunks but there are cross-dependencies in the protocol layer and it didn't seem worth the extra effort.
27 lines
1.5 KiB
C
27 lines
1.5 KiB
C
/***********************************************************************************************************************************
|
|
Remote Storage Protocol Handler
|
|
***********************************************************************************************************************************/
|
|
#ifndef STORAGE_DRIVER_REMOTE_PROTOCOL_H
|
|
#define STORAGE_DRIVER_REMOTE_PROTOCOL_H
|
|
|
|
#include "common/type/string.h"
|
|
#include "common/type/variantList.h"
|
|
#include "protocol/server.h"
|
|
|
|
/***********************************************************************************************************************************
|
|
Constants
|
|
***********************************************************************************************************************************/
|
|
#define PROTOCOL_BLOCK_HEADER "BRBLOCK"
|
|
|
|
#define PROTOCOL_COMMAND_STORAGE_LIST "storageList"
|
|
STRING_DECLARE(PROTOCOL_COMMAND_STORAGE_LIST_STR);
|
|
#define PROTOCOL_COMMAND_STORAGE_OPEN_READ "storageOpenRead"
|
|
STRING_DECLARE(PROTOCOL_COMMAND_STORAGE_OPEN_READ_STR);
|
|
|
|
/***********************************************************************************************************************************
|
|
Functions
|
|
***********************************************************************************************************************************/
|
|
bool storageDriverRemoteProtocol(const String *command, const VariantList *paramList, ProtocolServer *server);
|
|
|
|
#endif
|