40 lines
774 B
Go
Executable File
40 lines
774 B
Go
Executable File
package config
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
)
|
|
|
|
type Config struct {
|
|
zrpc.RpcServerConf
|
|
|
|
Mongo struct {
|
|
Schema string
|
|
User string
|
|
Password string
|
|
Host string
|
|
Port string
|
|
Database string
|
|
ReplicaName string
|
|
MaxStaleness time.Duration
|
|
MaxPoolSize uint64
|
|
MinPoolSize uint64
|
|
MaxConnIdleTime time.Duration
|
|
// Compressors []string
|
|
// EnableStandardReadWriteSplitMode bool
|
|
}
|
|
|
|
DB struct {
|
|
User string
|
|
Password string
|
|
Host string
|
|
Port int64
|
|
Database string
|
|
MaxIdleConns int
|
|
MaxOpenConns int
|
|
ConnMaxLifetime time.Duration
|
|
InterpolateParams bool
|
|
}
|
|
}
|