Documentation ¶
Index ¶
- type OptReadConcern
- type OptReadPreference
- type OptWriteConcern
- type Transaction
- type TransactionBundle
- func (sb *TransactionBundle) ConvertTransactionOption() session.ClientOptioner
- func (sb *TransactionBundle) ReadConcern(rc *readconcern.ReadConcern) *TransactionBundle
- func (sb *TransactionBundle) ReadPreference(rp *readpref.ReadPref) *TransactionBundle
- func (sb *TransactionBundle) Unbundle(deduplicate bool) ([]session.ClientOptioner, error)
- func (sb *TransactionBundle) WriteConcern(wc *writeconcern.WriteConcern) *TransactionBundle
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 ¶
func (sb *TransactionBundle) ReadConcern(rc *readconcern.ReadConcern) *TransactionBundle
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 ¶
func (sb *TransactionBundle) WriteConcern(wc *writeconcern.WriteConcern) *TransactionBundle
WriteConcern specifies the default write concern for transactions started from this session.