mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
de7fc37f88
Refactor storage layer to allow for new repository filesystems using drivers. (Reviewed by Cynthia Shang.) Refactor IO layer to allow for new compression formats, checksum types, and other capabilities using filters. (Reviewed by Cynthia Shang.)
63 lines
2.0 KiB
Perl
63 lines
2.0 KiB
Perl
####################################################################################################################################
|
|
# PROTOCOL COMMAND MINION MODULE
|
|
####################################################################################################################################
|
|
package pgBackRest::Protocol::Command::Minion;
|
|
use parent 'pgBackRest::Protocol::Base::Minion';
|
|
|
|
use strict;
|
|
use warnings FATAL => qw(all);
|
|
use Carp qw(confess);
|
|
use English '-no_match_vars';
|
|
|
|
use JSON::PP;
|
|
|
|
use pgBackRest::Common::Exception;
|
|
use pgBackRest::Common::Ini;
|
|
use pgBackRest::Common::Log;
|
|
use pgBackRest::Common::String;
|
|
use pgBackRest::Protocol::Base::Minion;
|
|
use pgBackRest::Common::Io::Buffered;
|
|
use pgBackRest::Version;
|
|
|
|
####################################################################################################################################
|
|
# CONSTRUCTOR
|
|
####################################################################################################################################
|
|
sub new
|
|
{
|
|
my $class = shift; # Class name
|
|
|
|
# Assign function parameters, defaults, and log debug info
|
|
my
|
|
(
|
|
$strOperation,
|
|
$strName, # Name of the protocol
|
|
$iBufferMax, # Maximum buffer size
|
|
$iProtocolTimeout, # Protocol timeout
|
|
) =
|
|
logDebugParam
|
|
(
|
|
__PACKAGE__ . '->new', \@_,
|
|
{name => 'strName'},
|
|
{name => 'iBufferMax'},
|
|
{name => 'iProtocolTimeout'},
|
|
);
|
|
|
|
# Open buffered protocol io
|
|
my $oIo =
|
|
new pgBackRest::Common::Io::Buffered(
|
|
new pgBackRest::Common::Io::Handle('stdio', *STDIN, *STDOUT), $iProtocolTimeout, $iBufferMax);
|
|
|
|
# Create the class hash
|
|
my $self = $class->SUPER::new($strName, $oIo);
|
|
bless $self, $class;
|
|
|
|
# Return from function and log return values if any
|
|
return logDebugReturn
|
|
(
|
|
$strOperation,
|
|
{name => 'self', value => $self}
|
|
);
|
|
}
|
|
|
|
1;
|