Documentation ¶
Overview ¶
Package mongoex contains a variety of tools for working safely with MongoDB.
There are tools for: - observability (both for queries and connection info) - health checks
Index ¶
- func Load(ctx context.Context, dbName, appName string, cfg Config, sys *system.System) (*mongo.Database, error)
- func New(ctx context.Context, appName string, cfg Config) (client *mongo.Client, err error)
- func Span(ctx context.Context, entity, queryName string) (context.Context, o11y.Span)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load(ctx context.Context, dbName, appName string, cfg Config, sys *system.System) (*mongo.Database, error)
Load connects to mongo. The context passed in is expected to carry an o11y provider and is only used for reporting (not for cancellation),
Types ¶
Click to show internal directories.
Click to hide internal directories.