Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorerlingsson committed Oct 10, 2024
1 parent 5b2d6ec commit b16cc3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/amqproxy/cli.cr
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class AMQProxy::CLI
Signal::INT.trap &shutdown
Signal::TERM.trap &shutdown

AMQProxy::HTTPServer.new(server, @listen_address, @http_port.to_i)
HTTPServer.new(server, @listen_address, @http_port.to_i)
server.listen(@listen_address, @listen_port.to_i)

# wait until all client connections are closed
Expand Down
7 changes: 3 additions & 4 deletions src/amqproxy/http_server.cr
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module AMQProxy
end
end
bind_tcp
spawn @http.listen, name: "HTTP_Server"
spawn @http.listen, name: "HTTP Server"
Log.info { "HTTP server listening on #{@address}:#{@port}" }
end

Expand All @@ -39,7 +39,6 @@ module AMQProxy

def metrics(context)
writer = PrometheusWriter.new(context.response, "amqproxy")

writer.write({name: "identity_info",
type: "gauge",
value: 1,
Expand All @@ -50,11 +49,11 @@ module AMQProxy
}})
writer.write({name: "client_connections",
value: @amqproxy.client_connections,
type: "counter",
type: "gauge",
help: "Number of client connections"})
writer.write({name: "upstream_connections",
value: @amqproxy.upstream_connections,
type: "counter",
type: "gauge",
help: "Number of upstream connections"})

context.response.status = ::HTTP::Status::OK
Expand Down

0 comments on commit b16cc3b

Please sign in to comment.