summaryrefslogtreecommitdiff
path: root/lib/oxidized/core.rb
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2013-04-17 17:48:50 +0300
committerSaku Ytti <saku@ytti.fi>2013-04-17 17:48:50 +0300
commit9d217025fac3e335c308f02e7377e14ccfdc0e66 (patch)
treeb90d4d04947fe26a9e592e12d8c4352142380c03 /lib/oxidized/core.rb
Initial commit
Silly for shit-and-giggles attempt at rancid
Diffstat (limited to 'lib/oxidized/core.rb')
-rw-r--r--lib/oxidized/core.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/oxidized/core.rb b/lib/oxidized/core.rb
new file mode 100644
index 0000000..76aa330
--- /dev/null
+++ b/lib/oxidized/core.rb
@@ -0,0 +1,21 @@
+module Oxidized
+ require 'oxidized/log'
+ require 'oxidized/config/core'
+ require 'oxidized/worker'
+ require 'oxidized/nodes'
+ require 'oxidized/manager'
+ class << self
+ def new *args
+ Core.new args
+ end
+ end
+
+ class Core
+ def initialize args
+ Oxidized.mgr = Manager.new
+ nodes = Nodes.new
+ worker = Worker.new nodes
+ loop { worker.work; sleep 1 }
+ end
+ end
+end