Package otelmongo instruments go.mongodb.org/mongo-driver/mongo. This package is compatible with v0.2.0 of go.mongodb.org/mongo-driver/mongo. `NewMonitor` will return an event.CommandMonitor which is used to trace requests. This code was originally based on the following: - https://github.com/DataDog/dd-trace-go/tree/02f0449efa3cb382d499fadc873957385dcb2192/contrib/go.mongodb.org/mongo-driver/mongo - https://github.com/DataDog/dd-trace-go/tree/v1.23.3/ddtrace/ext
Package mongo-driver provides functions to trace the go.mongodb.org/mongo-driver/mongo(https://github.com/mongodb/mongo-go-driver) package. It support v0.2.0 of github.com/mongodb/mongo-go-driver `NewMonitor` will return an event.CommandMonitor which is used to trace requests. This code was originally based on the following: - https://github.com/DataDog/dd-trace-go/tree/02f0449efa3cb382d499fadc873957385dcb2192/contrib/go.mongodb.org/mongo-driver/mongo - https://github.com/DataDog/dd-trace-go/tree/v1.23.3/ddtrace/ext
Package amboy provides basic infrastructure for running and describing jobs and job workflows with, potentially, minimal overhead and additional complexity. Amboy works with 4 basic logical objects: jobs representing work; runners, which are responsible for executing jobs; queues, that represent pipelines and offline workflows of jobs (i.e. not real time, processes that run outside of the primary execution path of a program); and dependencies that represent relationships between jobs. The inspiration for amboy was to be able to provide a unified way to define and run jobs, that would feel equally "native" for distributed applications and distributed web application, and move easily between different architectures. While amboy users will generally implement their own Job and dependency implementations, Amboy itself provides several example Queue implementations, as well as several generic examples and prototypes of Job and dependency.Manager objects. Generally speaking you should be able to use included amboy components to provide the queue and runner components, in conjunction with custom and generic job and dependency variations. Consider the following example: The amboy package proves a number of generic methods that, using the Queue.Stats() method, block until all jobs are complete. They provide different semantics, which may be useful in different circumstances. All of the Wait* functions wait until the total number of jobs submitted to the queue is equal to the number of completed jobs, and as a result these methods don't prevent other threads from adding jobs to the queue after beginning to wait. As a special case, retryable queues will also wait until there are no retrying jobs remaining. Additionally, there are a set of methods, WaitJob*, that allow callers to wait for a specific job to complete.
Package mgo offers a rich MongoDB driver for Go. Details about the mgo project (pronounced as "mango") are found in its web page: Usage of the driver revolves around the concept of sessions. To get started, obtain a session using the Dial function: This will establish one or more connections with the cluster of servers defined by the url parameter. From then on, the cluster may be queried with multiple consistency rules (see SetMode) and documents retrieved with statements such as: New sessions are typically created by calling session.Copy on the initial session obtained at dial time. These new sessions will share the same cluster information and connection cache, and may be easily handed into other methods and functions for organizing logic. Every session created must have its Close method called at the end of its life time, so its resources may be put back in the pool or collected, depending on the case. For more details, see the documentation for the types and methods.
Package mongodb implements a storage provider conforming to the storage interface in aries-framework-go. It is compatible with MongoDB v4.0.0, v4.2.8, and v5.0.0. It is also compatible with Amazon DocumentDB 4.0.0. It may be compatible with other versions, but they haven't been tested.
Package mgo offers a rich MongoDB driver for Go. ######################################################### THIS DRIVER IS UNMAINTAINED! See here for details: https://github.com/go-mgo/mgo/blob/v2-unstable/README.md ######################################################### Usage of the driver revolves around the concept of sessions. To get started, obtain a session using the Dial function: This will establish one or more connections with the cluster of servers defined by the url parameter. From then on, the cluster may be queried with multiple consistency rules (see SetMode) and documents retrieved with statements such as: New sessions are typically created by calling session.Copy on the initial session obtained at dial time. These new sessions will share the same cluster information and connection pool, and may be easily handed into other methods and functions for organizing logic. Every session created must have its Close method called at the end of its life time, so its resources may be put back in the pool or collected, depending on the case. For more details, see the documentation for the types and methods.
Package mgo (pronounced as "mango") offers a rich MongoDB driver for Go. Detailed documentation of the API is available at GoDoc: Usage of the driver revolves around the concept of sessions. To get started, obtain a session using the Dial function: This will establish one or more connections with the cluster of servers defined by the url parameter. From then on, the cluster may be queried with multiple consistency rules (see SetMode) and documents retrieved with statements such as: New sessions are typically created by calling session.Copy on the initial session obtained at dial time. These new sessions will share the same cluster information and connection pool, and may be easily handed into other methods and functions for organizing logic. Every session created must have its Close method called at the end of its life time, so its resources may be put back in the pool or collected, depending on the case. There is a sub-package that provides support for BSON, which can be used by itself as well: For more details, see the documentation for the types and methods.
Package dockertest contains helper functions for setting up and tearing down docker containers to aid in testing. dockertest supports spinning up MySQL, PostgreSQL and MongoDB out of the box. Dockertest provides two environment variables
Package docdb provides the API client, operations, and parameter types for Amazon DocumentDB with MongoDB compatibility. Amazon DocumentDB is a fast, reliable, and fully managed database service. Amazon DocumentDB makes it easy to set up, operate, and scale MongoDB-compatible databases in the cloud. With Amazon DocumentDB, you can run the same application code and use the same drivers and tools that you use with MongoDB.
Package grip provides a flexible logging package for basic Go programs. Drawing inspiration from Go and Python's standard library logging, as well as systemd's journal service, and other logging systems, Grip provides a number of very powerful logging abstractions in one high-level package. The central type of the grip package is the Journaler type, instances of which provide distinct log capturing system. For ease, following from the Go standard library, the grip package provides parallel public methods that use an internal "standard" Jouernaler instance in the grip package, which has some defaults configured and may be sufficient for many use cases. The send.Sender interface provides a way of changing the logging backend, and the send package provides a number of alternate implementations of logging systems, including: systemd's journal, logging to standard output, logging to a file, and generic syslog support. The message.Composer interface is the representation of all messages. They are implemented to provide a raw structured form as well as a string representation for more conentional logging output. Furthermore they are intended to be easy to produce, and defer more expensive processing until they're being logged, to prevent expensive operations producing messages that are below threshold. The MutiCatcher type makes it possible to collect from a group of operations and then aggregate them as a single error. Loging helpers exist for the following levels: These methods accept both strings (message content,) or types that implement the message.MessageComposer interface. Composer types make it possible to delay generating a message unless the logger is over the logging threshold. Use this to avoid expensive serialization operations for suppressed logging operations. All levels also have additional methods with `ln` and `f` appended to the end of the method name which allow Println() and Printf() style functionality. You must pass printf/println-style arguments to these methods. The Conditional logging methods take two arguments, a Boolean, and a message argument. Messages can be strings, objects that implement the MessageComposer interface, or errors. If condition boolean is true, the threshold level is met, and the message to log is not an empty string, then it logs the resolved message. Use conditional logging methods to potentially suppress log messages based on situations orthogonal to log level, with "log sometimes" or "log rarely" semantics. Combine with MessageComposers to to avoid expensive message building operations.
Package mongodocstore provides a docstore implementation for MongoDB and MongoDB-compatible services hosted on-premise or by cloud providers, including Amazon DocumentDB and Azure Cosmos DB. For docstore.OpenCollection, mongodocstore registers for the scheme "mongo". The default URL opener will dial a Mongo server using the environment variable "MONGO_SERVER_URL". To customize the URL opener, or for more details on the URL format, see URLOpener. See https://gocloud.dev/concepts/urls/ for background information. mongodocstore uses the unordered BulkWrite call of the underlying driver for writes, and uses Find with a list of document IDs for Get. (These implementation choices are subject to change.) It calls the BeforeDo function once before each call to the underlying driver. The as function passed to the BeforeDo function exposes the following types: mongodocstore exposes the following types for As: MongoDB represents times to millisecond precision, while Go's time.Time type has nanosecond precision. To save time.Times to MongoDB without loss of precision, save the result of calling UnixNano on the time. The official Go driver for MongoDB, go.mongodb.org/mongo-driver/mongo, lowercases struct field names; other docstore drivers do not. This means that you have to choose between interoperating with the MongoDB driver and interoperating with other docstore drivers. See Options.LowercaseFields for more information.