conf

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Pgsql.ProtoReflect.Descriptor instead.

func (*Pgsql) GetDriver

func (x *Pgsql) GetDriver() string

func (*Pgsql) GetMaxConn

func (x *Pgsql) GetMaxConn() int32

func (*Pgsql) GetMaxIdleTime

func (x *Pgsql) GetMaxIdleTime() *durationpb.Duration

func (*Pgsql) GetMaxLifeTime

func (x *Pgsql) GetMaxLifeTime() *durationpb.Duration

func (*Pgsql) GetMinConn

func (x *Pgsql) GetMinConn() int32

func (*Pgsql) GetSource

func (x *Pgsql) GetSource() string

func (*Pgsql) ProtoMessage

func (*Pgsql) ProtoMessage()

func (*Pgsql) ProtoReflect

func (x *Pgsql) ProtoReflect() protoreflect.Message

func (*Pgsql) Reset

func (x *Pgsql) Reset()

func (*Pgsql) String

func (x *Pgsql) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL