module Falcon::Environment::Server

def authority

@returns [String]
The server authority. Defaults to the server name.
def authority
	self.name
end

def cache

def cache
	false
end

def client_endpoint

def client_endpoint
	::Async::HTTP::Endpoint.parse(url)
end

def container_options

Options to use when creating the container.
def container_options
	{
		restart: true,
		count: self.count,
		health_check_timeout: 30,
	}.compact
end

def count

@returns [Integer | nil]
Number of instances to start. By default (when nil), uses `Etc.nprocessors`.
def count
	nil
end

def endpoint

@returns [Async::HTTP::Endpoint]
The upstream endpoint that will handle incoming requests.
def endpoint
	::Async::HTTP::Endpoint.parse(url).with(**endpoint_options)
end

def endpoint_options

def endpoint_options
	{
		reuse_address: true,
		timeout: timeout,
	}
end

def preload

Any scripts to preload before starting the server.
def preload
	[]
end

def service_class

@returns [Class]
The service class to use for the proxy.
def service_class
	Service::Server
end

def timeout

def timeout
	nil
end

def url

The host that this server will receive connections for.
def url
	"http://[::]:9292"
end

def verbose

def verbose
	false
end