lib/legion.rb in legionio-0.1.1 vs lib/legion.rb in legionio-0.2.0
- old
+ new
@@ -1,12 +1,21 @@
-# frozen_string_literal: true
-
Process.setproctitle('Legion')
+require 'concurrent-ruby'
+require 'securerandom'
+# require 'legion/exceptions'
require 'legion/version'
require 'legion/process'
require 'legion/service'
+require 'legion/extensions'
-# Base Legion Module to start the world
module Legion
- Legion::Service.new({})
- Legion::Logging.info("Started Legion v#{Legion::VERSION}")
+ attr_reader :service
+
+ def self.start
+ @service = Legion::Service.new
+ Legion::Logging.info("Started Legion v#{Legion::VERSION}")
+ end
+
+ def self.shutdown
+ @service.shutdown
+ end
end