From da6090ebacada693dba7d75dbc409b645e879bfc Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Fri, 6 Jan 2023 11:19:19 +0800 Subject: [PATCH] Update README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f8aa8b2..fb99ff6 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ DB.Use(dbresolver.Register(dbresolver.Config{ Replicas: []gorm.Dialector{mysql.Open("db3_dsn"), mysql.Open("db4_dsn")}, // sources/replicas load balancing policy Policy: dbresolver.RandomPolicy{}, + // print sources/replicas mode in logger + ResolverModeReplica: true, }).Register(dbresolver.Config{ // use `db1` as sources (DB's default connection), `db5` as replicas for `User`, `Address` Replicas: []gorm.Dialector{mysql.Open("db5_dsn")},