Documentation ¶
Index ¶
Constants ¶
View Source
const (
PluginsRoot = root + ".plugins"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientOptionsPlugin ¶
type ClientOptionsPlugin func(context.Context, *options.ClientOptions) error
ClientOptionsPlugin defines a mongo client options plugin signature.
type ClientPlugin ¶
ClientPlugin defines a mongo client plugin signature.
type Conn ¶
type Conn struct { ClientOptions *options.ClientOptions Client *mongo.Client Database *mongo.Database Options *Options Plugins []Plugin }
Conn represents a mongo connection.
func NewConnWithConfigPath ¶
NewConnWithConfigPath returns a new connection with options from config path.
type Options ¶
type Options struct { Uri string Auth *options.Credential }
Options represents mongo client options.
func NewOptions ¶
NewOptions returns options from config file or environment vars.
func NewOptionsWithPath ¶
NewOptionsWithPath unmarshals a given key path into options and returns it.
type Plugin ¶
type Plugin func(context.Context) (ClientOptionsPlugin, ClientPlugin)
Plugin defines a function to process plugin.
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
plugins
|
|
contrib/opentelemetry/otelmongo.v1
This package implements integration between the official go mongodb driver (https://github.com/mongodb/mongo-go-driver) and OpenTelemetry.
|
This package implements integration between the official go mongodb driver (https://github.com/mongodb/mongo-go-driver) and OpenTelemetry. |
Click to show internal directories.
Click to hide internal directories.