Sha256: cd21a00dbfb3a9f5cc0480c34f4fb9b3b36540665d75717db7c746abb2fa3547
Contents?: true
Size: 671 Bytes
Versions: 6
Compression:
Stored size: 671 Bytes
Contents
module Odania class Service < Odania::Consul def register_service(consul_config) if Diplomat::Service.register consul_config puts 'Service registered' else puts 'Error registering service' end end def consul_service_config(plugin_name, plugin_instance_name, ip, tags=[], port=80) { 'id' => plugin_instance_name, 'name' => plugin_name, 'tags' => tags, 'port' => port, 'token' => plugin_instance_name, 'checks' => [ { 'id' => plugin_name, 'name' => "HTTP on port #{port}", 'http' => "http://#{ip}:#{port}/health", 'interval' => '10s', 'timeout' => '1s' } ] } end end end
Version data entries
6 entries across 6 versions & 1 rubygems