Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBAdapter ¶
type DBAdapter interface { // get current unique id for all shards by sequencer CurrentSequenceID(conn *sql.DB, tableName string) (int64, error) // get next unique id for all shards by sequencer NextSequenceID(conn *sql.DB, tableName string) (int64, error) // create database if not exists by database configuration file. ExecDDL(config *config.DatabaseConfig) error // open connection by database configuration file OpenConnection(config *config.DatabaseConfig, queryValues string) (*sql.DB, error) // create table for sequencer if not exists CreateSequencerTableIfNotExists(conn *sql.DB, tableName string) error // insert first row to sequencer if not exists InsertRowToSequencerIfNotExists(conn *sql.DB, tableName string) error }
DBAdapter is a adapter for common sequence each database driver.
octillery currently supports mysql and sqlite3. If use the other new adapter, implement the following interface as plugin ( new_adapter.go ) and call adapter.Register("adapter_name", &NewAdapterStructure{}). Also, new_adapter.go file should put inside go.knocknote.io/octillery/plugin directory.
Click to show internal directories.
Click to hide internal directories.