Class: Files::AgentNode

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/agent_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ AgentNode

Returns a new instance of AgentNode.



7
8
9
10
# File 'lib/files.com/models/agent_node.rb', line 7

def initialize(attributes = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/agent_node.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/agent_node.rb', line 5

def options
  @options
end

Instance Method Details

#agent_versionObject

string - Agent version reported by this node



43
44
45
# File 'lib/files.com/models/agent_node.rb', line 43

def agent_version
  @attributes[:agent_version]
end

#availability_roleObject

string - Configured traffic preference



28
29
30
# File 'lib/files.com/models/agent_node.rb', line 28

def availability_role
  @attributes[:availability_role]
end

#connection_statusObject

string - Whether this node is currently available for traffic



33
34
35
# File 'lib/files.com/models/agent_node.rb', line 33

def connection_status
  @attributes[:connection_status]
end

#direct_transfer_availableObject

boolean - Whether the proxy recently validated a direct connection to this Agent node. False means direct transfers are enabled but not currently available; null means disabled or unsupported.



48
49
50
# File 'lib/files.com/models/agent_node.rb', line 48

def direct_transfer_available
  @attributes[:direct_transfer_available]
end

#hostnameObject

string - Hostname reported by the Agent



23
24
25
# File 'lib/files.com/models/agent_node.rb', line 23

def hostname
  @attributes[:hostname]
end

#is_defaultObject

boolean - Whether this node is the current default route for new unscoped work



38
39
40
# File 'lib/files.com/models/agent_node.rb', line 38

def is_default
  @attributes[:is_default]
end

#last_seen_atObject

date-time - Most recent successful node observation



53
54
55
# File 'lib/files.com/models/agent_node.rb', line 53

def last_seen_at
  @attributes[:last_seen_at]
end

#nameObject

string - Customer-configured Agent node name



18
19
20
# File 'lib/files.com/models/agent_node.rb', line 18

def name
  @attributes[:name]
end

#node_idObject

string - Stable Agent installation ID



13
14
15
# File 'lib/files.com/models/agent_node.rb', line 13

def node_id
  @attributes[:node_id]
end