Module: Legion::Extensions::Mesh::Helpers::Topology

Defined in:
lib/legion/extensions/mesh/helpers/topology.rb

Constant Summary collapse

PROTOCOLS =
%i[grpc websocket rest].freeze
PATTERNS =
%i[unicast multicast broadcast].freeze
MESH_SILENCE_TIMEOUT =

seconds

30
TRUST_CONSIDER_THRESHOLD =
0.3
MAX_HOPS =
3

Class Method Summary collapse

Class Method Details

.valid_pattern?(pattern) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/legion/extensions/mesh/helpers/topology.rb', line 21

def valid_pattern?(pattern)
  PATTERNS.include?(pattern)
end

.valid_protocol?(protocol) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/legion/extensions/mesh/helpers/topology.rb', line 17

def valid_protocol?(protocol)
  PROTOCOLS.include?(protocol)
end