Documentation ¶
Index ¶
- Constants
- Variables
- func ExecOrchestrator(query string, args ...interface{}) (sql.Result, error)
- func IsSQLite() bool
- func OpenDiscovery(host string, port int) (*sql.DB, error)
- func OpenOrchestrator() (db *sql.DB, err error)
- func OpenTopology(host string, port int) (*sql.DB, error)
- func QueryOrchestrator(query string, argsArray []interface{}, on_row func(sqlutils.RowMap) error) error
- func QueryOrchestratorBuffered(query string, argsArray []interface{}, on_row func(sqlutils.RowMap) error) error
- func QueryOrchestratorRowsMap(query string, on_row func(sqlutils.RowMap) error) error
- func QueryOrchestratorRowsMapBuffered(query string, on_row func(sqlutils.RowMap) error) error
- func ReadTimeNow() (timeNow string, err error)
- func SetupMySQLOrchestratorTLS(uri string) (string, error)
- func SetupMySQLTopologyTLS(uri string) (string, error)
- type DummySqlResult
Constants ¶
const Error1045 = "Access denied for user"
const Error3159 = "Error 3159:"
Variables ¶
var ( EmptyArgs []interface{} ErrNoMatch = errors.New("no match") )
Functions ¶
func ExecOrchestrator ¶
ExecOrchestrator will execute given query on the orchestrator backend database.
func OpenDiscovery ¶
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 ¶
OpenTopology returns the DB instance for the orchestrator backed database
func OpenTopology ¶
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 ¶
QueryRowsMapOrchestrator
func QueryOrchestratorRowsMapBuffered ¶
QueryOrchestratorRowsMapBuffered
func ReadTimeNow ¶
ReadTimeNow reads and returns the current timestamp as string. This is an unfortunate workaround to support both MySQL and SQLite in all possible timezones. SQLite only speaks UTC where MySQL has timezone support. By reading the time as string we get the database's de-facto notion of the time, which we can then feed back to it.
func SetupMySQLOrchestratorTLS ¶
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 ¶
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
Types ¶
type DummySqlResult ¶
type DummySqlResult struct { }
func (DummySqlResult) LastInsertId ¶
func (this DummySqlResult) LastInsertId() (int64, error)
func (DummySqlResult) RowsAffected ¶
func (this DummySqlResult) RowsAffected() (int64, error)