Method: Mongo::Srv::Resolver#record_prefix

Defined in:
lib/mongo/srv/resolver.rb

#record_prefix(srv_service_name = nil) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Generates the record prefix with a custom SRV service name if it is provided.

Parameters:

  • srv_service_name (Hash) (defaults to: nil)

    a customizable set of options

Options Hash (srv_service_name):

  • The (String | nil)

    SRV service name to use in the record prefix.

Returns:

  • (String)

    The generated record prefix.



38
39
40
# File 'lib/mongo/srv/resolver.rb', line 38

def record_prefix(srv_service_name=nil)
  return srv_service_name ? "_#{srv_service_name}._tcp." : RECORD_PREFIX
end