 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
const ( // ModeAlwaysOn is the fail point mode that enables the fail point for an // indefinite number of matching commands. ModeAlwaysOn = "alwaysOn" // ModeOff is the fail point mode that disables the fail point. ModeOff = "off" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
	FailCommands                  []string           `bson:"failCommands,omitempty"`
	CloseConnection               bool               `bson:"closeConnection,omitempty"`
	ErrorCode                     int32              `bson:"errorCode,omitempty"`
	FailBeforeCommitExceptionCode int32              `bson:"failBeforeCommitExceptionCode,omitempty"`
	ErrorLabels                   *[]string          `bson:"errorLabels,omitempty"`
	WriteConcernError             *WriteConcernError `bson:"writeConcernError,omitempty"`
	BlockConnection               bool               `bson:"blockConnection,omitempty"`
	BlockTimeMS                   int32              `bson:"blockTimeMS,omitempty"`
	AppName                       string             `bson:"appName,omitempty"`
}
    Data configures how a fail point will behave. It is used to set the FailPoint.Data field.
type FailPoint ¶
type FailPoint struct {
	ConfigureFailPoint string `bson:"configureFailPoint"`
	// Mode should be a string, FailPointMode, or map[string]interface{}
	Mode interface{} `bson:"mode"`
	Data Data        `bson:"data"`
}
    FailPoint is used to configure a server fail point. It is intended to be passed as the command argument to RunCommand.
For more information about fail points, see https://github.com/mongodb/specifications/tree/HEAD/source/transactions/tests#server-fail-point
type Mode ¶
Mode configures when a fail point will be enabled. It is used to set the FailPoint.Mode field.
type WriteConcernError ¶
type WriteConcernError struct {
	Code        int32     `bson:"code"`
	Name        string    `bson:"codeName"`
	Errmsg      string    `bson:"errmsg"`
	ErrorLabels *[]string `bson:"errorLabels,omitempty"`
	ErrInfo     bson.Raw  `bson:"errInfo,omitempty"`
}
    WriteConcernError is the write concern error to return when the fail point is triggered. It is used to set the FailPoint.Data.WriteConcernError field.
       Source Files
      ¶
      Source Files
      ¶
    
- failpoint.go
 Click to show internal directories. 
   Click to hide internal directories.