lib/micro/configuration.rb in micro-rb-0.1.0.rc2 vs lib/micro/configuration.rb in micro-rb-0.1.0.rc3
- old
+ new
@@ -6,12 +6,12 @@
include Singleton
# Sidecar settings
attr_accessor :sidecar_registry, :sidecar_host, :sidecar_port
- # API gateway settings
- attr_accessor :gateway_host, :gateway_port, :gateway_rpc
+ # Micro API settings
+ attr_accessor :api_host, :api_port, :api_rpc
def self.configure
yield(instance) if block_given?
end
@@ -21,16 +21,16 @@
def sidecar_registry_uri
"#{sidecar_uri}#{sidecar_registry}"
end
- def gateway_uri
- "#{gateway_host}:#{gateway_port}"
+ def api_uri
+ "#{api_host}:#{api_port}"
end
- def gateway_rpc_uri
- "#{gateway_uri}#{gateway_rpc}"
+ def api_rpc_uri
+ "#{api_uri}#{api_rpc}"
end
private
def initialize
@@ -39,12 +39,12 @@
# Default sidecar settings
self.sidecar_host ||= 'http://127.0.0.1'
self.sidecar_registry ||= '/registry'
self.sidecar_port ||= '8081'
- # Default API gateway settings
- self.gateway_host ||= 'http://127.0.0.1'
- self.gateway_rpc ||= '/rpc'
- self.gateway_port ||= '3002'
+ # Default micro API settings
+ self.api_host ||= 'http://127.0.0.1'
+ self.api_rpc ||= '/rpc'
+ self.api_port ||= '3002'
end
end
end