Documentation
¶
Index ¶
- Variables
- type Pgsql
- func (*Pgsql) Descriptor() ([]byte, []int)deprecated
- func (x *Pgsql) GetDriver() string
- func (x *Pgsql) GetMaxConn() int32
- func (x *Pgsql) GetMaxIdleTime() *durationpb.Duration
- func (x *Pgsql) GetMaxLifeTime() *durationpb.Duration
- func (x *Pgsql) GetMinConn() int32
- func (x *Pgsql) GetSource() string
- func (*Pgsql) ProtoMessage()
- func (x *Pgsql) ProtoReflect() protoreflect.Message
- func (x *Pgsql) Reset()
- func (x *Pgsql) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_pgsql_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Pgsql ¶
type Pgsql struct {
// The driver name for the PgSQL database.
// PgSQL 数据库的驱动名称。
Driver string `protobuf:"bytes,1,opt,name=driver,proto3" json:"driver,omitempty"`
// The data source name (DSN) for the PgSQL database.
// PgSQL 数据库的数据源名称(DSN),用于连接数据库。
Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
// The minimum number of connections to maintain in the connection pool.
// 连接池中需要维持的最小连接数。
MinConn int32 `protobuf:"varint,3,opt,name=min_conn,json=minConn,proto3" json:"min_conn,omitempty"`
// The maximum number of connections to maintain in the connection pool.
// 连接池中需要维持的最大连接数。
MaxConn int32 `protobuf:"varint,4,opt,name=max_conn,json=maxConn,proto3" json:"max_conn,omitempty"`
// The maximum lifetime for a connection in the connection pool.
// 连接池中连接的最大生命时间,超过该时间的连接可能会被关闭。
MaxLifeTime *durationpb.Duration `protobuf:"bytes,5,opt,name=max_life_time,json=maxLifeTime,proto3" json:"max_life_time,omitempty"`
// The maximum idle time for a connection in the connection pool.
// 连接池中连接的最大空闲时间,超过该时间的连接可能会被关闭。
MaxIdleTime *durationpb.Duration `protobuf:"bytes,6,opt,name=max_idle_time,json=maxIdleTime,proto3" json:"max_idle_time,omitempty"`
// contains filtered or unexported fields
}
Defines a message type for PgSQL configuration. 定义一个用于 PgSQL 数据库配置的消息类型。
func (*Pgsql) Descriptor
deprecated
func (*Pgsql) GetMaxConn ¶
func (*Pgsql) GetMaxIdleTime ¶
func (x *Pgsql) GetMaxIdleTime() *durationpb.Duration
func (*Pgsql) GetMaxLifeTime ¶
func (x *Pgsql) GetMaxLifeTime() *durationpb.Duration
func (*Pgsql) GetMinConn ¶
func (*Pgsql) ProtoMessage ¶
func (*Pgsql) ProtoMessage()
func (*Pgsql) ProtoReflect ¶
func (x *Pgsql) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.