Versions in this module Expand all Collapse all v0 v0.1.0 Dec 6, 2018 Changes in this version + const Aborted + const Committed + const InProgress + const None + const Starting + const UUIDSubtype + var ErrAbortAfterCommit = errors.New("cannot call abortTransaction after calling commitTransaction") + var ErrAbortTwice = errors.New("cannot call abortTransaction twice") + var ErrCommitAfterAbort = errors.New("cannot call commitTransaction after calling abortTransaction") + var ErrNoTransactStarted = errors.New("no transaction started") + var ErrSessionEnded = errors.New("ended session was used") + var ErrTransactInProgress = errors.New("transaction already in progress") + var ErrUnackWCUnsupported = errors.New("transactions do not support unacknowledged write concerns") + func MaxClusterTime(ct1 bsonx.Doc, ct2 bsonx.Doc) bsonx.Doc + type Client struct + Aborting bool + ClientID uuid.UUID + ClusterTime bsonx.Doc + Committing bool + Consistent bool + CurrentRc *readconcern.ReadConcern + CurrentRp *readpref.ReadPref + CurrentWc *writeconcern.WriteConcern + OperationTime *primitive.Timestamp + RetryWrite bool + RetryingCommit bool + SessionType Type + Terminated bool + func NewClientSession(pool *Pool, clientID uuid.UUID, sessionType Type, opts ...*ClientOptions) (*Client, error) + func (c *Client) AbortTransaction() error + func (c *Client) AdvanceClusterTime(clusterTime bsonx.Doc) error + func (c *Client) AdvanceOperationTime(opTime *primitive.Timestamp) error + func (c *Client) ApplyCommand() + func (c *Client) CheckAbortTransaction() error + func (c *Client) CheckCommitTransaction() error + func (c *Client) CheckStartTransaction() error + func (c *Client) CommitTransaction() error + func (c *Client) EndSession() + func (c *Client) StartTransaction(opts *TransactionOptions) error + func (c *Client) TransactionCommitted() bool + func (c *Client) TransactionInProgress() bool + func (c *Client) TransactionRunning() bool + func (c *Client) TransactionStarting() bool + func (c *Client) UpdateUseTime() error + type ClientOptions struct + CausalConsistency *bool + DefaultReadConcern *readconcern.ReadConcern + DefaultReadPreference *readpref.ReadPref + DefaultWriteConcern *writeconcern.WriteConcern + type ClusterClock struct + func (cc *ClusterClock) AdvanceClusterTime(clusterTime bsonx.Doc) + func (cc *ClusterClock) GetClusterTime() bsonx.Doc + type Node struct + type Pool struct + func NewPool(descChan <-chan description.Topology) *Pool + func (p *Pool) CheckedOut() int + func (p *Pool) GetSession() (*Server, error) + func (p *Pool) IDSlice() []bsonx.Doc + func (p *Pool) ReturnSession(ss *Server) + func (p *Pool) String() string + type Server struct + LastUsed time.Time + SessionID bsonx.Doc + TxnNumber int64 + func (ss *Server) IncrementTxnNumber() + type TransactionOptions struct + ReadConcern *readconcern.ReadConcern + ReadPreference *readpref.ReadPref + WriteConcern *writeconcern.WriteConcern + type Type uint8 + const Explicit + const Implicit