mongo-drivergo.mongodb.org/mongo-driver/mongo/sessionopt Index | Files

package sessionopt

import "go.mongodb.org/mongo-driver/mongo/sessionopt"

Index

Types

type OptCausalConsistency

type OptCausalConsistency session.OptCausalConsistency

OptCausalConsistency specifies if a client session should be causally consistent.

func CausalConsistency

func CausalConsistency(b bool) OptCausalConsistency

CausalConsistency specifies if a client session should be causally consistent. Causally consistent reads are not causally consistent with unacknowledged writes.

func (OptCausalConsistency) ConvertSessionOption

func (opt OptCausalConsistency) ConvertSessionOption() session.ClientOptioner

ConvertSessionOption implements the Session interface.

type Session

type Session interface {
	ConvertSessionOption() session.ClientOptioner
	// contains filtered or unexported methods
}

Session represents options for creating client sessions.

type SessionBundle

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

SessionBundle bundles session options

func BundleSession

func BundleSession(opts ...Session) *SessionBundle

BundleSession bundles session options

func (*SessionBundle) CausalConsistency

func (sb *SessionBundle) CausalConsistency(b bool) *SessionBundle

CausalConsistency specifies if a session should be causally consistent. Defaults to true. Causally consistent reads are not causally consistent with unacknowledged writes.

func (*SessionBundle) ConvertSessionOption

func (sb *SessionBundle) ConvertSessionOption() session.ClientOptioner

ConvertSessionOption implements the Session interface

func (*SessionBundle) Unbundle

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

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

Source Files

sessionopt.go

Version
v0.0.11
Published
Aug 8, 2018
Platform
windows/amd64
Imports
2 packages
Last checked
2 minutes ago

Tools for package owners.