Module: Hoth
- Defined in:
- lib/hoth.rb,
lib/hoth/modules.rb,
lib/hoth/service.rb,
lib/hoth/version.rb,
lib/hoth/endpoint.rb,
lib/hoth/services.rb,
lib/hoth/transport.rb,
lib/hoth/exceptions.rb,
lib/hoth/util/logger.rb,
lib/hoth/encoding/json.rb,
lib/hoth/encoding/no_op.rb,
lib/hoth/service_module.rb,
lib/hoth/transport/base.rb,
lib/hoth/transport/http.rb,
lib/hoth/transport/https.rb,
lib/hoth/service_registry.rb,
lib/hoth/service_definition.rb,
lib/hoth/transport/beanstalkd.rb,
lib/hoth/providers/rack_provider.rb,
lib/hoth/providers/beanstalkd_provider.rb
Defined Under Namespace
Modules: Encoding, Providers, Transport
Classes: EmptyServiceNameError, EncodingError, Endpoint, HothException, Logger, Modules, RecursiveServiceCallException, Service, ServiceDefinition, ServiceModule, ServiceNotFoundException, ServiceRegistry, Services, TransportError, TransportException
Constant Summary
collapse
- VERSION =
"0.4.1"
Class Method Summary
collapse
Class Method Details
.client_uuid ⇒ Object
35
36
37
|
# File 'lib/hoth.rb', line 35
def client_uuid
@client_uuid
end
|
.config_path ⇒ Object
39
40
41
|
# File 'lib/hoth.rb', line 39
def config_path
@config_path || "config/"
end
|
.config_path=(config_path) ⇒ Object
43
44
45
|
# File 'lib/hoth.rb', line 43
def config_path=(config_path)
@config_path = config_path
end
|
.env ⇒ Object
55
56
57
|
# File 'lib/hoth.rb', line 55
def env
@env || ENV["HOTH_ENV"] || (Object.const_defined?("Rails") ? Rails.env.to_sym : :development)
end
|
.env=(env) ⇒ Object
59
60
61
|
# File 'lib/hoth.rb', line 59
def env=(env)
@env = env.to_sym
end
|
.init! ⇒ Object
28
29
30
31
32
33
|
# File 'lib/hoth.rb', line 28
def init!
load_service_definition
load_module_definition
Logger.init_logging!
@client_uuid = Digest::SHA1.hexdigest("Time.now--#{rand()}")
end
|
.load_module_definition ⇒ Object
51
52
53
|
# File 'lib/hoth.rb', line 51
def load_module_definition
require File.join(config_path, "module_definition")
end
|
.load_service_definition ⇒ Object
47
48
49
|
# File 'lib/hoth.rb', line 47
def load_service_definition
require File.join(config_path, "service_definition")
end
|