Documentation ¶
Index ¶
Constants ¶
View Source
const ( OperationSet = "$set" OperationIn = "$in" OperationNotIn = "$nin" OperationGte = "$gte" OperationGt = "$gt" OperationLte = "$lte" OperationLt = "$lt" OperationOr = "$or" OperationUnset = "$unset" OperationRegex = "$regex" OperationInc = "$inc" OperationPull = "$pull" OperationNin = "$nin" OperationNe = "$ne" OperationEq = "$eq" OperationMatch = "$match" OperationGroup = "$group" OperationLookup = "$lookup" OperationProject = "$project" OperationAddFields = "$addFields" OperationBucket = "$bucket" OperationBucketAuto = "$bucketAuto" OperationChangeStream = "$changeStream" OperationCollStats = "$collStats" OperationCount = "$count" FieldFrom = "from" FieldLocalField = "localField" FieldForeignField = "foreignField" FieldAs = "as" FieldLet = "let" FieldPipeline = "pipeline" )
Variables ¶
This section is empty.
Functions ¶
func NewMongoClient ¶
NewMongoClient ...
func NewMonitor ¶
func NewMonitor(logger log.Logger, opts ...MonitorOption) *event.CommandMonitor
NewMonitor ...
Types ¶
type Config ¶
type Config struct { AppName string Hosts []string Addr string MaxPoolSize uint32 MinPoolSize uint32 MaxConnecting uint32 ConnectTimeout *durationpb.Duration Timeout *durationpb.Duration HeartbeatInterval *durationpb.Duration MaxConnIdleTime *durationpb.Duration SlowThreshold *durationpb.Duration // Debug Deprecated Debug bool }
Config ...
type MonitorOption ¶ added in v0.2.34
type MonitorOption func(*monitorOption)
func WithSlowThreshold ¶ added in v0.2.34
func WithSlowThreshold(slowThreshold time.Duration) MonitorOption
WithSlowThreshold 慢查询阈值
Click to show internal directories.
Click to hide internal directories.