Skip to Content Skip to Search

Common implementation for SVCB-compatible resource records.

Methods
A
N
S

Attributes

[R] params

The service paramters for the target host.

[R] priority

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.

[R] target

The domain name of the target host.

Class Public methods

new(priority, target, params = [])

Create a service binding resource record.

# File ruby/lib/resolv.rb, line 2754
def initialize(priority, target, params = [])
  @priority = priority.to_int
  @target = Name.create(target)
  @params = SvcParams.new(params)
end

Instance Public methods

alias_mode?()

Whether this RR is in AliasMode.

# File ruby/lib/resolv.rb, line 2781
def alias_mode?
  self.priority == 0
end

service_mode?()

Whether this RR is in ServiceMode.

# File ruby/lib/resolv.rb, line 2788
def service_mode?
  !alias_mode?
end