mongoex

package
v1.0.1707-45421b4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(ctx context.Context, 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),

func Span

func Span(ctx context.Context, entity, queryName string) (context.Context, o11y.Span)

Span provides a o11y span to ensure our database queries are reported consistently.

Types

type Config

type Config struct {
	AppName string
	URI     string
	DBName  string
	UseTLS  bool
}

Jump to

Keyboard shortcuts

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