Class: Nonnative::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/nonnative/runner.rb

Overview

Base runtime wrapper for a configured runnable unit.

A runner wraps a configuration object (a subclass of ConfigurationRunner) and exposes lifecycle behavior via specialized subclasses:

  • Process for OS-level child processes

  • Server for in-process Ruby servers (threads)

  • Service for proxy-only external dependencies

Each runner has an associated proxy instance created via ProxyFactory.

See Also:

Direct Known Subclasses

Process, Server, Service

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service) ⇒ Runner

Returns a new instance of Runner.

Parameters:



25
26
27
28
# File 'lib/nonnative/runner.rb', line 25

def initialize(service)
  @service = service
  @proxy = Nonnative::ProxyFactory.create(service)
end

Instance Attribute Details

#proxyNonnative::Proxy (readonly)

Returns the proxy instance for this runner.

Returns:



22
23
24
# File 'lib/nonnative/runner.rb', line 22

def proxy
  @proxy
end

Instance Method Details

#nameString?

Returns the configured runner name.

Returns:

  • (String, nil)


33
34
35
# File 'lib/nonnative/runner.rb', line 33

def name
  service.name
end