Class: Utils::ProbeClient
Defined Under Namespace
Classes: EnvProxy
Instance Method Summary collapse
-
#enqueue(args) ⇒ Object
The enqueue method submits a new process job to the probe server for execution.
-
#env ⇒ Utils::ProbeServer::EnvProxy
The env method provides access to environment variable management through a proxy object.
-
#initialize ⇒ Utils::ProbeServer
constructor
The initialize method sets up a new probe server instance.
Constructor Details
#initialize ⇒ Utils::ProbeServer
The initialize method sets up a new probe server instance.
This method creates and configures a Unix domain socket server for handling probe jobs and communication. It initializes the server with a specific socket name and runtime directory, preparing it to listen for incoming connections and process jobs.
179 180 181 |
# File 'lib/utils/probe_server.rb', line 179 def initialize @server = UnixSocks::Server.new(socket_name: 'probe.sock', runtime_dir: Dir.pwd) end |
Instance Method Details
#enqueue(args) ⇒ Object
The enqueue method submits a new process job to the probe server for execution.
This method transmits a process job request to the underlying Unix domain socket server, which then adds the job to the processing queue. The job includes the specified command arguments that will be executed by the probe server.
job
206 207 208 |
# File 'lib/utils/probe_server.rb', line 206 def enqueue(args) @server.transmit({ type: 'process_job', args: }) end |
#env ⇒ Utils::ProbeServer::EnvProxy
The env method provides access to environment variable management through a proxy object.
This method returns an EnvProxy instance that allows for setting and retrieving environment variables via the probe server communication channel.
variable operations
192 193 194 |
# File 'lib/utils/probe_server.rb', line 192 def env EnvProxy.new(@server) end |