connstring

package
v0.0.0-...-ae3bf8c Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnString

type ConnString struct {
	Original                string
	AppName                 string
	AuthMechanism           string
	AuthMechanismProperties map[string]string
	AuthSource              string
	Connect                 ConnectMode
	ConnectTimeout          time.Duration
	Database                string
	FSync                   bool
	HeartbeatInterval       time.Duration
	Hosts                   []string
	Journal                 bool
	KerberosService         string
	KerberosServiceHost     string
	MaxConnIdleTime         time.Duration
	MaxConnLifeTime         time.Duration
	MaxConnsPerHost         uint16
	MaxConnsPerHostSet      bool
	MaxIdleConnsPerHost     uint16
	MaxIdleConnsPerHostSet  bool
	Password                string
	PasswordSet             bool
	ReadPreference          string
	ReadPreferenceTagSets   []map[string]string
	ReplicaSet              string
	ServerSelectionTimeout  time.Duration
	SocketTimeout           time.Duration
	Username                string
	UseSSL                  bool
	W                       string
	WTimeout                time.Duration

	Options        map[string][]string
	UnknownOptions map[string][]string
}

ConnString represents a connection string to mongodb.

func ParseURIConnectionString

func ParseURIConnectionString(s string) (ConnString, error)

Parse parses the provided uri and returns a URI object.

func (*ConnString) String

func (u *ConnString) String() string

type ConnectMode

type ConnectMode uint8

ConnectMode informs the driver on how to connect to the server.

const (
	AutoConnect ConnectMode = iota
	SingleConnect
)

ConnectMode constants.

Jump to

Keyboard shortcuts

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