db

package
v2.1.1-BETA+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EmptyArgs []interface{}
)

Functions

func ExecOrchestrator

func ExecOrchestrator(query string, args ...interface{}) (sql.Result, error)

ExecOrchestrator will execute given query on the orchestrator backend database.

func OpenDiscovery

func OpenDiscovery(host string, port int) (*sql.DB, error)

OpenDiscovery returns a DB instance to access a topology instance. It has lower read timeout than OpenTopology and is intended to be used with low-latency discovery queries.

func OpenOrchestrator

func OpenOrchestrator() (db *sql.DB, err error)

OpenTopology returns the DB instance for the orchestrator backed database

func OpenTopology

func OpenTopology(host string, port int) (*sql.DB, error)

OpenTopology returns a DB instance to access a topology instance.

func QueryOrchestrator

func QueryOrchestrator(query string, argsArray []interface{}, on_row func(sqlutils.RowMap) error) error

QueryOrchestrator

func QueryOrchestratorBuffered

func QueryOrchestratorBuffered(query string, argsArray []interface{}, on_row func(sqlutils.RowMap) error) error

QueryOrchestratorBuffered

func QueryOrchestratorRowsMap

func QueryOrchestratorRowsMap(query string, on_row func(sqlutils.RowMap) error) error

QueryRowsMapOrchestrator

func QueryOrchestratorRowsMapBuffered

func QueryOrchestratorRowsMapBuffered(query string, on_row func(sqlutils.RowMap) error) error

QueryOrchestratorRowsMapBuffered

func SetupMySQLOrchestratorTLS

func SetupMySQLOrchestratorTLS(uri string) (string, error)

Create a TLS configuration from the config supplied CA, Certificate, and Private key. Register the TLS config with the mysql drivers as the "orchestrator" config Modify the supplied URI to call the TLS config

func SetupMySQLTopologyTLS

func SetupMySQLTopologyTLS(uri string) (string, error)

Create a TLS configuration from the config supplied CA, Certificate, and Private key. Register the TLS config with the mysql drivers as the "topology" config Modify the supplied URI to call the TLS config TODO: Way to have password mixed with TLS for various nodes in the topology. Currently everything is TLS or everything is password

Types

type DummySqlResult

type DummySqlResult struct {
}

func (DummySqlResult) LastInsertId

func (this DummySqlResult) LastInsertId() (int64, error)

func (DummySqlResult) RowsAffected

func (this DummySqlResult) RowsAffected() (int64, error)

Jump to

Keyboard shortcuts

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