Module Moped::ReadPreference::Selectable
In: lib/moped/read_preference/selectable.rb

Provides the shared behaviour for read preferences that can filter by a tag set or add query options.

@since 2.0.0

Methods

new   query_options  

Included Modules

Retryable

Attributes

tags  [R]  @!attribute tags
  @return [ Array<Hash> ] The tag sets.

Public Class methods

Instantiate the new taggable read preference.

@example Instantiate the taggable.

  Moped::ReadPreference::Secondary.new({ east_coast: 1 })

@param [ Array<Hash> ] tags The tag sets.

@since 2.0.0

Public Instance methods

Get the provided options as query options for this read preference.

@example Get the query options.

  preference.query_options({})

@param [ Hash ] options The existing options for the query.

@return [ Hash ] The options plus additional query options.

@since 2.0.0

[Validate]