Common implementation for SVCB-compatible resource records.
Attributes
Read
The priority of this target host.
The range is 0-65535. If set to 0, this RR is in AliasMode. Otherwise, it is in ServiceMode.
Read
The domain name of the target host.
Read
The service parameters for the target host.
Class Methods
lib/resolv.rb
View on GitHub
# File tmp/rubies/ruby-3.4.0-preview1/lib/resolv.rb, line 2809
def initialize(priority, target, params = [])
@priority = priority.to_int
@target = Name.create(target)
@params = SvcParams.new(params)
end
Create a service binding resource record.
Instance Methods
lib/resolv.rb
View on GitHub
# File tmp/rubies/ruby-3.4.0-preview1/lib/resolv.rb, line 2836
def alias_mode?
self.priority == 0
end
Whether this RR is in AliasMode.
lib/resolv.rb
View on GitHub
# File tmp/rubies/ruby-3.4.0-preview1/lib/resolv.rb, line 2843
def service_mode?
!alias_mode?
end
Whether this RR is in ServiceMode.