Package octillery is a Go package for sharding databases.
It can use with every OR Mapping library (xorm, gorp, gorm, dbr...) implementing database/sql interface, or raw SQL.
const Version = "v1.1.1"
Version is the variable for versioning Octillery
AfterCommitCallback set function for it is callbacked after commit. Function is set as internal global variable, so must be care possible about it is called by multiple threads.
BeforeCommitCallback set function for it is callbacked before commit. Function is set as internal global variable, so must be care possible about it is called by multiple threads.
Exec invoke sql.Query or sql.Exec by query type.
There is no need to worry about whether target databases are sharded or not.
LoadConfig load your database configuration file.
If use with debug mode, set environment variable ( `OCTILLERY_DEBUG=1` ) before call this method.
Loaded configuration instance is set to internal global variable, therefore you can use only single configuration file at each application.
Configuration format see go.knocknote.io/octillery/config