go-gorm / go-gorm/dbresolver

Config different max connc

Open
#119 0 comments 4 reactions 1 assignee Claimed by @jinzhu View on GitHub
type:question
Dominant language
Go
Stars
538
Forks
69
PR merge metrics
No merged PRs in 30d

Description

## Your Question
Is it possible to configure a different MaxConnectionCount for the sources and replica DBs used by the resolver?

## The document you expected this should be explained
I looked at the offical documentation, but it looks like it sets a global MaxConnection for all connections
```
DB.Use(
dbresolver.Register(dbresolver.Config{ /* xxx */ }).
SetConnMaxIdleTime(time.Hour).
SetConnMaxLifetime(24 * time.Hour).
SetMaxIdleConns(100).
SetMaxOpenConns(200)
)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.