Class: Cuboid::OptionGroups::Agent

Inherits:
Cuboid::OptionGroup show all
Defined in:
lib/cuboid/option_groups/agent.rb

Overview

Holds options for RPC::Server::Agent servers.

Author:

  • Tasos “Zapotek” Laskos <tasos.laskos@gmail.com>

Constant Summary collapse

STRATEGIES =
Set.new([:horizontal, :vertical, :direct])

Instance Attribute Summary collapse

Method Summary

Methods inherited from Cuboid::OptionGroup

#==, attr_accessor, attributes, #attributes, defaults, #defaults, #hash, inherited, #initialize, #merge, set_defaults, #to_h, #to_hash, #to_rpc_data, #update, #validate

Constructor Details

This class inherits a constructor from Cuboid::OptionGroup

Instance Attribute Details

#instance_port_rangeArray<Integer>

Returns Range of ports to use when spawning instances, first entry should be the lowest port number, last the max port number.

Returns:

  • (Array<Integer>)

    Range of ports to use when spawning instances, first entry should be the lowest port number, last the max port number.



17
18
19
# File 'lib/cuboid/option_groups/agent.rb', line 17

def instance_port_range
  @instance_port_range
end

#nameString

Returns Agent name.

Returns:

  • (String)

    Agent name.



32
33
34
# File 'lib/cuboid/option_groups/agent.rb', line 32

def name
  @name
end

#peerString

Returns The URL of a peering RPC::Server::Agent, applicable when RPC::Server::Agent are connected to each other to form a Grid.

Returns:

See Also:



24
25
26
# File 'lib/cuboid/option_groups/agent.rb', line 24

def peer
  @peer
end

#ping_intervalFloat

Returns How regularly to check for peer statuses.

Returns:

  • (Float)

    How regularly to check for peer statuses.



28
29
30
# File 'lib/cuboid/option_groups/agent.rb', line 28

def ping_interval
  @ping_interval
end

#strategyObject

Returns the value of attribute strategy.



34
35
36
# File 'lib/cuboid/option_groups/agent.rb', line 34

def strategy
  @strategy
end

#urlString

Returns URL of a RPC::Server::Agent.

Returns:



12
13
14
# File 'lib/cuboid/option_groups/agent.rb', line 12

def url
  @url
end