Class: Saklient::Cloud::Resources::LbServer

Inherits:
Object
  • Object
show all
Defined in:
lib/saklient/cloud/resources/lb_server.rb

Overview

ロードバランサの監視対象サーバ設定.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Fixnum) active_connections (readonly)

現在の接続数

Returns:

  • (Fixnum)


247
248
249
# File 'lib/saklient/cloud/resources/lb_server.rb', line 247

def active_connections
  @active_connections
end

- (bool) enabled

有効状態

Returns:

  • (bool)


40
41
42
# File 'lib/saklient/cloud/resources/lb_server.rb', line 40

def enabled
  @enabled
end

- (String) ip_address

IPアドレス

Returns:

  • (String)


76
77
78
# File 'lib/saklient/cloud/resources/lb_server.rb', line 76

def ip_address
  @ip_address
end

- (String) path_to_check

監視対象パス

Returns:

  • (String)


184
185
186
# File 'lib/saklient/cloud/resources/lb_server.rb', line 184

def path_to_check
  @path_to_check
end

- (Fixnum) port

ポート番号

Returns:

  • (Fixnum)


112
113
114
# File 'lib/saklient/cloud/resources/lb_server.rb', line 112

def port
  @port
end

- (String) protocol

監視方法

Returns:

  • (String)


148
149
150
# File 'lib/saklient/cloud/resources/lb_server.rb', line 148

def protocol
  @protocol
end

- (Fixnum) response_expected

監視時に期待されるレスポンスコード

Returns:

  • (Fixnum)


220
221
222
# File 'lib/saklient/cloud/resources/lb_server.rb', line 220

def response_expected
  @response_expected
end

- (String) status (readonly)

現在の状態

Returns:

  • (String)


270
271
272
# File 'lib/saklient/cloud/resources/lb_server.rb', line 270

def status
  @status
end

Instance Method Details

- (any) to_raw_settings

Returns:

  • (any)


323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/saklient/cloud/resources/lb_server.rb', line 323

def to_raw_settings
  return {
    Enabled: (@_enabled).nil? ? nil : (@_enabled ? 'True' : 'False'),
    IPAddress: @_ip_address,
    Port: @_port,
    HealthCheck: {
      Protocol: @_protocol,
      Path: @_path_to_check,
      Status: @_response_expected
    }
  }
end