mongodb-driver v0.6.3 Mongo.ReadPreference View Source

Determines which servers are considered suitable for read operations

Link to this section Summary

Link to this section Types

Link to this type

t() View Source
t() :: %{
  mode:
    :primary | :secondary | :primary_preferred | :secondary_preferred | :nearest,
  tag_sets: [%{required(String.t()) => String.t()}],
  max_staleness_ms: non_neg_integer()
}

Link to this section Functions

Link to this function

add_read_preference(cmd, opts) View Source

Add read preference to the cmd