Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrClientDisconnected = mongo.ErrClientDisconnected ErrEmptySlice = mongo.ErrEmptySlice ErrInvalidIndexValue = mongo.ErrInvalidIndexValue ErrMissingResumeToken = mongo.ErrMissingResumeToken ErrMultipleIndexDrop = mongo.ErrMultipleIndexDrop ErrNilCursor = mongo.ErrNilCursor ErrNilDocument = mongo.ErrNilDocument ErrNoDocuments = mongo.ErrNoDocuments ErrNonStringIndexName = mongo.ErrNonStringIndexName ErrUnacknowledgedWrite = mongo.ErrUnacknowledgedWrite ErrWrongClient = mongo.ErrWrongClient )
View Source
var (
Default = StdConfig("default").Build()
)
Functions ¶
Types ¶
type Config ¶ added in v1.0.0
type Config struct { URI string `config:"uri" desc:"mongodb uri string."` EnableCommandMonitor bool `config:"commandMonitor"` EnablePoolMonitor bool `config:"poolMonitor"` // contains filtered or unexported fields }
func DefaultConfig ¶ added in v1.0.0
func StdConfig ¶ added in v1.0.0
func StdConfig(key string, optionFunc ...OptionFunc) *Config
type Mongo ¶
type Mongo struct {
// contains filtered or unexported fields
}
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
func (*Monitor) CommandMonitor ¶
func (mon *Monitor) CommandMonitor() *event.CommandMonitor
func (*Monitor) PoolEventMonitor ¶
func (mon *Monitor) PoolEventMonitor() *event.PoolMonitor
type OptionFunc ¶
type OptionFunc func(*Config)
func WithCommandMonitor ¶
func WithCommandMonitor(monitor *event.CommandMonitor) OptionFunc
func WithPoolMonitor ¶
func WithPoolMonitor(monitor *event.PoolMonitor) OptionFunc
Click to show internal directories.
Click to hide internal directories.