Class: A2A::Server::FalconRunner
- Inherits:
-
Object
- Object
- A2A::Server::FalconRunner
- Defined in:
- lib/simple_a2a/server/falcon_runner.rb
Constant Summary collapse
- DEFAULT_HOST =
"localhost"- DEFAULT_PORT =
9292
Instance Method Summary collapse
-
#initialize(app, host: DEFAULT_HOST, port: DEFAULT_PORT) ⇒ FalconRunner
constructor
A new instance of FalconRunner.
- #run ⇒ Object
Constructor Details
#initialize(app, host: DEFAULT_HOST, port: DEFAULT_PORT) ⇒ FalconRunner
Returns a new instance of FalconRunner.
13 14 15 16 17 |
# File 'lib/simple_a2a/server/falcon_runner.rb', line 13 def initialize(app, host: DEFAULT_HOST, port: DEFAULT_PORT) @app = app @host = host @port = port end |
Instance Method Details
#run ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/simple_a2a/server/falcon_runner.rb', line 19 def run endpoint = Async::HTTP::Endpoint.parse("http://#{@host}:#{@port}") server = Falcon::Server.new(Falcon::Server.middleware(@app), endpoint) Async do server.run end rescue Interrupt # Ctrl-C — clean shutdown, no backtrace needed end |