package Admin::Sys::Host;

use strict;
use warnings;

use base 'Class::Singleton';

use DateTime;
use Sys::Hostname;

our @ISA       = (qw(Exporter));
our @EXPORT    = (qw/get_mydump_config/);
our @EXPORT_OK = (qw/get_mydump_config/);

use lib '/app/tools/common/lib';
use Common::YamlConfig;
use Common::DB::Connect;

sub instance {
    my $conf = Common::YamlConfig::get_config(__PACKAGE__);
    my $all;
    foreach my $k ( keys %{$conf} ) {
        next if not ref $conf->{$k} eq 'ARRAY';
        push @{$all}, @{ $conf->{$k} };
    }
    $all = [ sort @{$all} ];
    $conf->add( 'all', $all );
    $conf;
}

1;
