Class: Minke::Docker::Consul
- Inherits:
-
Object
- Object
- Minke::Docker::Consul
- Defined in:
- lib/minke/docker/consul.rb
Instance Method Summary collapse
-
#initialize(health_check, service_discovery, consul_loader, docker_runner, network, project_name) ⇒ Consul
constructor
A new instance of Consul.
-
#start_and_load_data(consul_config) ⇒ Object
start_and_load_data config.
-
#stop ⇒ Object
stop consul.
Constructor Details
#initialize(health_check, service_discovery, consul_loader, docker_runner, network, project_name) ⇒ Consul
Returns a new instance of Consul.
4 5 6 7 8 9 10 11 |
# File 'lib/minke/docker/consul.rb', line 4 def initialize health_check, service_discovery, consul_loader, docker_runner, network, project_name @health_check = health_check @service_discovery = service_discovery @consul_loader = consul_loader @docker_runner = docker_runner @network = network @project_name = project_name end |
Instance Method Details
#start_and_load_data(consul_config) ⇒ Object
start_and_load_data config
15 16 17 18 19 |
# File 'lib/minke/docker/consul.rb', line 15 def start_and_load_data consul_config start wait_for_startup consul_config.url load_data consul_config.url, consul_config.config_file end |
#stop ⇒ Object
stop consul
23 24 25 26 |
# File 'lib/minke/docker/consul.rb', line 23 def stop @docker_runner.stop_container @container @docker_runner.delete_container @container end |