readconcern

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(concern *ReadConcern)

Option is an option to provide when creating a ReadConcern.

func Level

func Level(level string) Option

Level creates an option that sets the level of a ReadConcern.

type ReadConcern

type ReadConcern struct {
	// contains filtered or unexported fields
}

ReadConcern for replica sets and replica set shards determines which data to return from a query.

func Available

func Available() *ReadConcern

Available specifies that the query should return data from the instance with no guarantee that the data has been written to a majority of the replica set members (i.e. may be rolled back).

func Linearizable

func Linearizable() *ReadConcern

Linearizable specifies that the query should return data that reflects all successful writes issued with a write concern of "majority" and acknowledged prior to the start of the read operation.

func Local

func Local() *ReadConcern

Local specifies that the query should return the instance’s most recent data.

func Majority

func Majority() *ReadConcern

Majority specifies that the query should return the instance’s most recent data acknowledged as having been written to a majority of members in the replica set.

func New

func New(options ...Option) *ReadConcern

New constructs a new read concern from the given string.

func Snapshot

func Snapshot() *ReadConcern

Snapshot is only available for operations within multi-document transactions.

func (*ReadConcern) MarshalBSONValue

func (rc *ReadConcern) MarshalBSONValue() (bsontype.Type, []byte, error)

MarshalBSONValue implements the bson.ValueMarshaler interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL