Class: MLserver::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/MLserver/settings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host: "0.0.0.0", port: "8080") ⇒ Settings

Returns a new instance of Settings.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/MLserver/settings.rb', line 5

def initialize(host: "0.0.0.0", port: "8080")
  @host = host
  @port = port.to_i
  @handler = nil
  @logger = nil
  @force_host = nil
  @ssl = nil
  @ssl_key = nil
  @ssl_cert = nil
  @ssl_additional_certs = []
  @ssl_host = nil
  @ssl_port  = nil
  @trim_urls = false
  @use_http_versions = ["HTTP/1.0", "HTTP/1.1"]
end

Instance Attribute Details

#force_hostObject

Returns the value of attribute force_host.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def force_host
  @force_host
end

#handlerObject

Returns the value of attribute handler.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def handler
  @handler
end

#hostObject

Returns the value of attribute host.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def host
  @host
end

#loggerObject

Returns the value of attribute logger.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def logger
  @logger
end

#portObject

Returns the value of attribute port.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def port
  @port
end

#sslObject

Returns the value of attribute ssl.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def ssl
  @ssl
end

#ssl_additional_certsObject

Returns the value of attribute ssl_additional_certs.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def ssl_additional_certs
  @ssl_additional_certs
end

#ssl_certObject

Returns the value of attribute ssl_cert.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def ssl_cert
  @ssl_cert
end

#ssl_hostObject

Returns the value of attribute ssl_host.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def ssl_host
  @ssl_host
end

#ssl_keyObject

Returns the value of attribute ssl_key.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def ssl_key
  @ssl_key
end

#ssl_portObject

Returns the value of attribute ssl_port.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def ssl_port
  @ssl_port
end

#trim_urlsObject

Returns the value of attribute trim_urls.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def trim_urls
  @trim_urls
end

#use_http_versionsObject

Returns the value of attribute use_http_versions.



21
22
23
# File 'lib/MLserver/settings.rb', line 21

def use_http_versions
  @use_http_versions
end