Class: Nonnative::ConfigurationProcess

Inherits:
ConfigurationRunner show all
Defined in:
lib/nonnative/configuration_process.rb

Overview

Process-specific configuration.

A “process” is an OS-level child process started via spawn and stopped via signals. It is managed by Process at runtime.

Instances are usually created through Nonnative::Configuration#process.

Instance Attribute Summary collapse

Attributes inherited from ConfigurationRunner

#host, #name, #port, #proxy, #wait

Method Summary

Methods inherited from ConfigurationRunner

#initialize

Constructor Details

This class inherits a constructor from Nonnative::ConfigurationRunner

Instance Attribute Details

#commandProc, ...

Returns:

  • (Proc)

    a callable that returns the command string to execute (e.g. ‘-> { “./bin/api” }`)

  • (String, nil)

    signal name to use for stopping (defaults to ‘“INT”` when not set)

  • (Numeric)

    readiness timeout (seconds) used when waiting for the port to open/close

  • (String)

    log file path to append process stdout/stderr to

  • (Hash, nil)

    environment variables to pass to the spawned process



19
20
21
# File 'lib/nonnative/configuration_process.rb', line 19

def command
  @command
end

#environmentProc, ...

Returns:

  • (Proc)

    a callable that returns the command string to execute (e.g. ‘-> { “./bin/api” }`)

  • (String, nil)

    signal name to use for stopping (defaults to ‘“INT”` when not set)

  • (Numeric)

    readiness timeout (seconds) used when waiting for the port to open/close

  • (String)

    log file path to append process stdout/stderr to

  • (Hash, nil)

    environment variables to pass to the spawned process



19
20
21
# File 'lib/nonnative/configuration_process.rb', line 19

def environment
  @environment
end

#logProc, ...

Returns:

  • (Proc)

    a callable that returns the command string to execute (e.g. ‘-> { “./bin/api” }`)

  • (String, nil)

    signal name to use for stopping (defaults to ‘“INT”` when not set)

  • (Numeric)

    readiness timeout (seconds) used when waiting for the port to open/close

  • (String)

    log file path to append process stdout/stderr to

  • (Hash, nil)

    environment variables to pass to the spawned process



19
20
21
# File 'lib/nonnative/configuration_process.rb', line 19

def log
  @log
end

#signalProc, ...

Returns:

  • (Proc)

    a callable that returns the command string to execute (e.g. ‘-> { “./bin/api” }`)

  • (String, nil)

    signal name to use for stopping (defaults to ‘“INT”` when not set)

  • (Numeric)

    readiness timeout (seconds) used when waiting for the port to open/close

  • (String)

    log file path to append process stdout/stderr to

  • (Hash, nil)

    environment variables to pass to the spawned process



19
20
21
# File 'lib/nonnative/configuration_process.rb', line 19

def signal
  @signal
end

#timeoutProc, ...

Returns:

  • (Proc)

    a callable that returns the command string to execute (e.g. ‘-> { “./bin/api” }`)

  • (String, nil)

    signal name to use for stopping (defaults to ‘“INT”` when not set)

  • (Numeric)

    readiness timeout (seconds) used when waiting for the port to open/close

  • (String)

    log file path to append process stdout/stderr to

  • (Hash, nil)

    environment variables to pass to the spawned process



19
20
21
# File 'lib/nonnative/configuration_process.rb', line 19

def timeout
  @timeout
end