Sha256: bfce5cdbd3fcf9db5fc3173853bdc347cb50315e60e8f3cc1cf6983a874950e0
Contents?: true
Size: 1.33 KB
Versions: 2
Compression:
Stored size: 1.33 KB
Contents
# Doozer entries are in json require 'multi_json' require 'thread_safe' # # RubySkynet Service # # Supports # Hosting Skynet Services # Skynet Service registration # module RubySkynet module Service def self.included(base) base.extend ClassMethods base.class_eval do include SemanticLogger::Loggable sync_cattr_reader :logger do SemanticLogger::Logger.new(self) end end # Register the service with the Server # The server will publish the server to Doozer when the server is running Server.register_service(base) end module ClassMethods # Name of this service to Register with Skynet # Default: class name def service_name @@service_name ||= name.gsub('::', '.') end def service_name=(service_name) @@service_name = service_name end # Version of this service to register with Skynet, defaults to 1 # Default: 1 def service_version @@service_version ||= 1 end def service_version=(service_version) @@service_version = service_version end # Key by which this service is known in the doozer registry def service_key "/services/#{service_name}/#{service_version}/#{Server.region}/#{Server.hostname}/#{Server.port}" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ruby_skynet-0.4.0.pre2 | lib/ruby_skynet/service.rb |
ruby_skynet-0.4.0.pre | lib/ruby_skynet/service.rb |