2016-09-06 15:35:02 +02:00
|
|
|
####################################################################################################################################
|
|
|
|
# PROTOCOL LOCAL MASTER MODULE
|
|
|
|
####################################################################################################################################
|
2017-05-15 17:12:14 +02:00
|
|
|
package pgBackRest::Protocol::Local::Master;
|
|
|
|
use parent 'pgBackRest::Protocol::Command::Master';
|
2016-09-06 15:35:02 +02:00
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings FATAL => qw(all);
|
|
|
|
use Carp qw(confess);
|
|
|
|
|
2017-05-15 22:01:00 +02:00
|
|
|
use pgBackRest::Backup::File;
|
2016-09-06 15:35:02 +02:00
|
|
|
use pgBackRest::Common::Log;
|
|
|
|
use pgBackRest::Config::Config;
|
2017-05-15 17:12:14 +02:00
|
|
|
use pgBackRest::Protocol::Command::Master;
|
2016-09-06 15:35:02 +02:00
|
|
|
|
|
|
|
####################################################################################################################################
|
|
|
|
# CONSTRUCTOR
|
|
|
|
####################################################################################################################################
|
|
|
|
sub new
|
|
|
|
{
|
|
|
|
my $class = shift;
|
|
|
|
|
|
|
|
# Assign function parameters, defaults, and log debug info
|
|
|
|
my
|
|
|
|
(
|
|
|
|
$strOperation,
|
|
|
|
$strCommand,
|
|
|
|
$iProcessIdx,
|
|
|
|
) =
|
|
|
|
logDebugParam
|
|
|
|
(
|
|
|
|
__PACKAGE__ . '->new', \@_,
|
|
|
|
{name => 'strCommand'},
|
|
|
|
{name => 'iProcessIdx', default => 1},
|
|
|
|
);
|
|
|
|
|
|
|
|
# Init object and store variables
|
|
|
|
my $self = $class->SUPER::new(
|
2017-10-21 20:40:14 +02:00
|
|
|
'local', "local-${iProcessIdx} process", $strCommand, cfgOption(CFGOPT_BUFFER_SIZE),
|
|
|
|
cfgOption(CFGOPT_COMPRESS_LEVEL), cfgOption(CFGOPT_COMPRESS_LEVEL_NETWORK), cfgOption(CFGOPT_PROTOCOL_TIMEOUT));
|
2016-09-06 15:35:02 +02:00
|
|
|
|
|
|
|
bless $self, $class;
|
|
|
|
|
|
|
|
# Return from function and log return values if any
|
|
|
|
return logDebugReturn
|
|
|
|
(
|
|
|
|
$strOperation,
|
|
|
|
{name => 'self', value => $self}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|