db

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector interface {
	Init() error
	Connect() (*mgo.Session, error)
	Close()
}

A Connector provides a database connection. It encapsulates logic about where and how to connect, like the TLS config, so that code using a Connector does not need to know this logic. Implementations can also vary wrt connection pooling.

func NewConnector

func NewConnector(url string, timeout int, tlsConfig *tls.Config, credentials map[string]string) Connector

Jump to

Keyboard shortcuts

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