Class: Utils::ProbeClient

Inherits:
Object show all
Defined in:
lib/utils/probe_server.rb

Defined Under Namespace

Classes: EnvProxy

Instance Method Summary collapse

Constructor Details

#initializeProbeClient

Returns a new instance of ProbeClient.



75
76
77
# File 'lib/utils/probe_server.rb', line 75

def initialize
  @server = UnixSocks::Server.new(socket_name: 'probe.sock', runtime_dir: Dir.pwd)
end

Instance Method Details

#enqueue(args) ⇒ Object



83
84
85
# File 'lib/utils/probe_server.rb', line 83

def enqueue(args)
  @server.transmit({ type: 'process_job', args: })
end

#envObject



79
80
81
# File 'lib/utils/probe_server.rb', line 79

def env
  EnvProxy.new(@server)
end