mongopkg

package
v0.2.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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

func NewMongoClient(config *Config, logger log.Logger) (*mongo.Client, error)

NewMongoClient ...

func NewMonitor

func NewMonitor(logger log.Logger) *event.CommandMonitor

NewMonitor ...

Types

type Config

type Config struct {
	Hosts             []string
	Addr              string
	AppName           string
	MaxPoolSize       uint64
	MinPoolSize       uint64
	MaxConnecting     uint64
	ConnectTimeout    time.Duration
	HeartbeatInterval time.Duration
	MaxConnIdleTime   time.Duration
	Timeout           time.Duration
	Debug             bool
}

Config ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL