Documentation ¶
Index ¶
- Constants
- Variables
- func CloseDBConn()
- func GetOrInitDBConn(forceNewConn bool, randomCN bool) (*sql.DB, error)
- func GetSQLWriterDBAddressFunc() func(context.Context, bool) (string, error)
- func IsRecordExisted(ctx context.Context, record []string, tbl *table.Table, ...) (bool, error)
- func SetDBConn(conn *sql.DB)
- func SetSQLWriterDBAddressFunc(f func(context.Context, bool) (string, error))
- func SetSQLWriterDBUser(userName string, password string)
- func WriteRowRecords(records [][]string, tbl *table.Table, timeout time.Duration) (int, error)
- type CSVWriter
- type DBConnProvider
- type DBUser
Constants ¶
View Source
const DBConnRetryThreshold = 8
View Source
const MOLoggerUser = "mo_logger"
View Source
const MaxConnectionNumber = 1
Variables ¶
View Source
var (
DBConnErrCount atomic.Uint32
)
sqlWriterDBUser holds the db user for logger
Functions ¶
func CloseDBConn ¶ added in v1.0.1
func CloseDBConn()
func GetOrInitDBConn ¶ added in v1.0.1
func IsRecordExisted ¶ added in v1.0.0
func SetSQLWriterDBUser ¶
Types ¶
type CSVWriter ¶ added in v1.0.0
type CSVWriter struct {
// contains filtered or unexported fields
}
func NewCSVWriter ¶ added in v1.0.0
func (*CSVWriter) GetContent ¶ added in v1.0.0
func (*CSVWriter) WriteStrings ¶ added in v1.0.0
type DBConnProvider ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.