transactionopt

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OptReadConcern

type OptReadConcern session.OptCurrentReadConcern

OptReadConcern specifies the default read concern for transactions started from this session.

func ReadConcern

func ReadConcern(rc *readconcern.ReadConcern) OptReadConcern

ReadConcern specifies the default read concern for transactions started from this session.

func (OptReadConcern) ConvertTransactionOption

func (opt OptReadConcern) ConvertTransactionOption() session.ClientOptioner

ConvertTransactionOption implements the Transaction interface.

type OptReadPreference

type OptReadPreference session.OptCurrentReadPreference

OptReadPreference specifies the default read preference for transactions started from this session.

func ReadPreference

func ReadPreference(rp *readpref.ReadPref) OptReadPreference

ReadPreference specifies the default read preference for transactions started from this session.

func (OptReadPreference) ConvertTransactionOption

func (opt OptReadPreference) ConvertTransactionOption() session.ClientOptioner

ConvertTransactionOption implements the Transaction interface.

type OptWriteConcern

type OptWriteConcern session.OptCurrentWriteConcern

OptWriteConcern specifies the default write concern for transactions started from this session.

func WriteConcern

func WriteConcern(wc *writeconcern.WriteConcern) OptWriteConcern

WriteConcern specifies the default write concern for transactions started from this session.

func (OptWriteConcern) ConvertTransactionOption

func (opt OptWriteConcern) ConvertTransactionOption() session.ClientOptioner

ConvertTransactionOption implements the Transaction interface.

type Transaction

type Transaction interface {
	ConvertTransactionOption() session.ClientOptioner
	// contains filtered or unexported methods
}

Transaction represents options for creating client sessions.

type TransactionBundle

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

TransactionBundle bundles session options

func BundleTransaction

func BundleTransaction(opts ...Transaction) *TransactionBundle

BundleTransaction bundles session options

func (*TransactionBundle) ConvertTransactionOption

func (sb *TransactionBundle) ConvertTransactionOption() session.ClientOptioner

ConvertTransactionOption implements the Transaction interface

func (*TransactionBundle) ReadConcern

ReadConcern specifies the default read concern for transactions started from this session.

func (*TransactionBundle) ReadPreference

func (sb *TransactionBundle) ReadPreference(rp *readpref.ReadPref) *TransactionBundle

ReadPreference specifies the default read preference for transactions started from this session.

func (*TransactionBundle) Unbundle

func (sb *TransactionBundle) Unbundle(deduplicate bool) ([]session.ClientOptioner, error)

Unbundle transforms a bundle into a slice of options, optionally deduplicating.

func (*TransactionBundle) WriteConcern

WriteConcern specifies the default write concern for transactions started from this session.

Jump to

Keyboard shortcuts

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