Class: Kumonos::Envoy::DiscoverService

Inherits:
Struct
  • Object
show all
Defined in:
lib/kumonos/envoy.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#clusterObject

Returns the value of attribute cluster

Returns:

  • (Object)

    the current value of cluster



75
76
77
# File 'lib/kumonos/envoy.rb', line 75

def cluster
  @cluster
end

#refresh_delay_msObject

Returns the value of attribute refresh_delay_ms

Returns:

  • (Object)

    the current value of refresh_delay_ms



75
76
77
# File 'lib/kumonos/envoy.rb', line 75

def refresh_delay_ms
  @refresh_delay_ms
end

Class Method Details

.build(h) ⇒ Object



77
78
79
# File 'lib/kumonos/envoy.rb', line 77

def build(h)
  new(h.fetch('refresh_delay_ms'), Cluster.build(h.fetch('cluster')))
end

Instance Method Details

#to_hObject



82
83
84
85
86
# File 'lib/kumonos/envoy.rb', line 82

def to_h
  h = super
  h[:cluster] = cluster.to_h
  h
end