cluster

package
v0.0.0-...-9778c65 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(config ConnectionConfig, connectionBuilder ServerConnectionBuilder, endpoints []string) (driver.Connection, error)

NewConnection creates a new cluster connection to a cluster of servers. The given connections are existing connections to each of the servers.

Types

type ConnectionConfig

type ConnectionConfig struct {
	// DefaultTimeout is the timeout used by requests that have no timeout set in the given context.
	DefaultTimeout time.Duration
}

ConnectionConfig provides all configuration options for a cluster connection.

type ServerConnectionBuilder

type ServerConnectionBuilder func(endpoint string) (driver.Connection, error)

ServerConnectionBuilder specifies a function called by the cluster connection when it needs to create an underlying connection to a specific endpoint.

Jump to

Keyboard shortcuts

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