httpx/sig/resolver/resolver.rbs
HoneyryderChuck b42f1ae6b1 rename system_resolve to hosts_resolve
to not confuse with the system resolver, which uses getaddrinfo
2025-09-03 11:46:24 +01:00

65 lines
1.7 KiB
Plaintext

module HTTPX
module Resolver
class Resolver
include Callbacks
include Loggable
include _Selectable
RECORD_TYPES: Hash[ip_family, singleton(Resolv::DNS::Resource)]
FAMILY_TYPES: Hash[singleton(Resolv::DNS::Resource), String]
attr_reader family: ip_family
attr_reader options: Options
attr_writer current_selector: Selector?
attr_writer current_session: Session?
attr_accessor multi: Multi?
@record_type: singleton(Resolv::DNS::Resource)
@resolver_options: Hash[Symbol, untyped]
@connections: Array[Connection]
def close: () -> void
alias terminate close
def closed?: () -> bool
def empty?: () -> bool
def each_connection: () { (Connection connection) -> void } -> void
def emit_addresses: (Connection connection, ip_family family, Array[ipaddr], ?bool early_resolve) -> void
def self.multi?: () -> bool
private
def resolve: (?Connection connection, ?String hostname) -> void
def emit_resolved_connection: (Connection connection, Array[ipaddr] addresses, bool early_resolve) -> void
def initialize: (ip_family family, Options options) -> void
def early_resolve: (Connection connection, ?hostname: String) -> bool
def set_resolver_callbacks: () -> void
def resolve_connection: (Connection connection) -> void
def emit_connection_error: (Connection connection, StandardError error) -> void
def close_resolver: (Resolver resolver) -> void
def emit_resolve_error: (Connection connection, ?String hostname, ?StandardError) -> void
def resolve_error: (String hostname, ?StandardError?) -> (ResolveError | ResolveTimeoutError)
end
end
end