Module: Nanite

Defined in:
lib/nanite.rb,
lib/nanite/job.rb,
lib/nanite/log.rb,
lib/nanite/amqp.rb,
lib/nanite/actor.rb,
lib/nanite/admin.rb,
lib/nanite/agent.rb,
lib/nanite/state.rb,
lib/nanite/config.rb,
lib/nanite/mapper.rb,
lib/nanite/reaper.rb,
lib/nanite/cluster.rb,
lib/nanite/console.rb,
lib/nanite/packets.rb,
lib/nanite/identity.rb,
lib/nanite/pid_file.rb,
lib/nanite/daemonize.rb,
lib/nanite/streaming.rb,
lib/nanite/serializer.rb,
lib/nanite/local_state.rb,
lib/nanite/mapper_proxy.rb,
lib/nanite/log/formatter.rb,
lib/nanite/actor_registry.rb,
lib/nanite/redis_tag_store.rb,
lib/nanite/nanite_dispatcher.rb,
lib/nanite/security_provider.rb,
lib/nanite/security/signature.rb,
lib/nanite/security/certificate.rb,
lib/nanite/security/rsa_key_pair.rb,
lib/nanite/security/certificate_cache.rb,
lib/nanite/security/secure_serializer.rb,
lib/nanite/security/distinguished_name.rb,
lib/nanite/security/encrypted_document.rb,
lib/nanite/security/static_certificate_store.rb,
lib/nanite/security/cached_certificate_store_proxy.rb

Defined Under Namespace

Modules: AMQPHelper, Actor, CommonConfig, Console, ConsoleHelper, DaemonizeHelper, FileStreaming, Identity Classes: ActorRegistry, Admin, Advertise, Agent, CachedCertificateStoreProxy, Certificate, CertificateCache, Cluster, DefaultSecurityModule, Dispatcher, DistinguishedName, EncryptedDocument, FileChunk, FileEnd, FileStart, IntermediateMessage, Job, JobWarden, LocalState, Log, Mapper, MapperNotRunning, MapperProxy, Packet, PidFile, Ping, Push, Reaper, RedisTagStore, Register, Request, Result, RsaKeyPair, SecureSerializer, SecurityProvider, Serializer, Signature, State, StaticCertificateStore, TagQuery, TagUpdate, UnRegister

Constant Summary collapse

VERSION =
'0.4.1.22'
COMMON_DEFAULT_OPTIONS =
{
  :pass => 'testing',
  :vhost => '/nanite',
  :secure => false,
  :host => '0.0.0.0',
  :log_level => :info,
  :format => :marshal,
  :daemonize => false,
  :console => false,
  :root => Dir.pwd
}
PKCS7 =
OpenSSL::PKCS7

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.agentObject (readonly)

Returns the value of attribute agent.



47
48
49
# File 'lib/nanite.rb', line 47

def agent
  @agent
end

.mapperObject (readonly)

Returns the value of attribute mapper.



47
48
49
# File 'lib/nanite.rb', line 47

def mapper
  @mapper
end

Class Method Details

.ensure_mapperObject



67
68
69
70
71
72
# File 'lib/nanite.rb', line 67

def ensure_mapper
  @mapper ||= MapperProxy.instance
  unless @mapper
    raise MapperNotRunning.new('A mapper needs to be started via Nanite.start_mapper')
  end
end

.push(*args) ⇒ Object



62
63
64
65
# File 'lib/nanite.rb', line 62

def push(*args)
  ensure_mapper
  @mapper.push(*args)
end

.request(*args, &blk) ⇒ Object



57
58
59
60
# File 'lib/nanite.rb', line 57

def request(*args, &blk)
  ensure_mapper
  @mapper.request(*args, &blk)
end

.start_agent(options = {}) ⇒ Object



49
50
51
# File 'lib/nanite.rb', line 49

def start_agent(options = {})
  @agent = Nanite::Agent.start(options)
end

.start_mapper(options = {}) ⇒ Object



53
54
55
# File 'lib/nanite.rb', line 53

def start_mapper(options = {})
  @mapper = Nanite::Mapper.start(options)
end