Class: Expedite::Client::AgentProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/expedite/client/agent_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, env:) ⇒ AgentProxy

Returns a new instance of AgentProxy.

Parameters:

  • name (String)

    Name of the agent

  • env (Expedite::Env)

    Environment



13
14
15
16
# File 'lib/expedite/client/agent_proxy.rb', line 13

def initialize(name, env:)
  self.name = name
  self.env = env
end

Instance Attribute Details

#envObject

Returns the value of attribute env.



7
8
9
# File 'lib/expedite/client/agent_proxy.rb', line 7

def env
  @env
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/expedite/client/agent_proxy.rb', line 7

def name
  @name
end

Instance Method Details

#exec(*args) ⇒ Object



18
19
20
# File 'lib/expedite/client/agent_proxy.rb', line 18

def exec(*args)
  Client::Exec.new(env: env, agent: name).call(*args)
end

#invoke(*args) ⇒ Object



22
23
24
# File 'lib/expedite/client/agent_proxy.rb', line 22

def invoke(*args)
  Client::Invoke.new(env: env, agent: name).call(*args)
end