Class: SwarmClusterCliOpe::SyncConfigs::BaseDatabase

Inherits:
Base
  • Object
show all
Defined in:
lib/swarm_cluster_cli_ope/sync_configs/base_database.rb

Direct Known Subclasses

MongoDb, Mysql, PostGres

Defined Under Namespace

Classes: EnvConfigs

Instance Attribute Summary

Attributes inherited from Base

#configs, #service

Instance Method Summary collapse

Methods inherited from Base

#initialize, #pull, #push

Methods included from LoggerConcern

#logger

Constructor Details

This class inherits a constructor from SwarmClusterCliOpe::SyncConfigs::Base

Instance Method Details

#localSwarmClusterCliOpe::SyncConfigs::EnvConfigs



11
12
13
# File 'lib/swarm_cluster_cli_ope/sync_configs/base_database.rb', line 11

def local
  self.class::EnvConfigs.new(self, @configs.dig(:configs, :local) || {}, -> { local_container })
end

#remoteSwarmClusterCliOpe::SyncConfigs::EnvConfigs



6
7
8
# File 'lib/swarm_cluster_cli_ope/sync_configs/base_database.rb', line 6

def remote
  self.class::EnvConfigs.new(self, @configs.dig(:configs, :remote) || {}, -> { container })
end

#resume(direction) ⇒ Object

Funzione che ricapitola le informazioni utilizzate per eseguire l’operazione



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/swarm_cluster_cli_ope/sync_configs/base_database.rb', line 23

def resume(direction)
  puts "RESUME - #{direction}
      service: #{service}
      local:
        service_name: #{local.service_name}
        database_name: #{local.database_name}
        username: #{local.username}
        password: #{local.password}
        version: #{local.database_version}
      remote:
        service_name: #{remote.service_name}
        database_name: #{remote.database_name}
        username: #{remote.username}
        password: #{remote.password}
        version: #{remote.database_version}"

end