Class: Falcon::Host
Instance Method Summary
collapse
Methods inherited from Service
#initialize
Instance Method Details
#authority ⇒ Object
29
30
31
|
# File 'lib/falcon/host.rb', line 29
def authority
@evaluator.authority
end
|
#bound_endpoint ⇒ Object
45
46
47
|
# File 'lib/falcon/host.rb', line 45
def bound_endpoint
@evaluator.bound_endpoint
end
|
#endpoint ⇒ Object
33
34
35
|
# File 'lib/falcon/host.rb', line 33
def endpoint
@evaluator.endpoint
end
|
#name ⇒ Object
25
26
27
|
# File 'lib/falcon/host.rb', line 25
def name
"Falcon Host for #{self.authority}"
end
|
#root ⇒ Object
41
42
43
|
# File 'lib/falcon/host.rb', line 41
def root
@evaluator.root
end
|
#run(container) ⇒ Object
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# File 'lib/falcon/host.rb', line 53
def run(container)
if @environment.include?(:server)
bound_endpoint = self.bound_endpoint
container.run(name: self.name, restart: true) do |task, instance|
Async.logger.info(self) {"Starting application server, binding to #{self.endpoint}..."}
server = @evaluator.server
server.run
task.children.each(&:wait)
end
container.attach do
bound_endpoint.close
end
end
end
|
#ssl_context ⇒ Object
37
38
39
|
# File 'lib/falcon/host.rb', line 37
def ssl_context
@evaluator.ssl_context
end
|
#to_s ⇒ Object
49
50
51
|
# File 'lib/falcon/host.rb', line 49
def to_s
"\#<#{self.class} #{@evaluator.authority}>"
end
|