sqlm

package
v0.0.0-...-bebf002 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBLoginConfig

type DBLoginConfig struct {
	Host        string
	TimeZone    string
	Port        string
	User        string
	Password    string
	Dbname      string
	Sslcert     string
	Sslkey      string
	Sslrootcert string
	Sslmode     string
}

type DbConfigConn

type DbConfigConn struct {
	MaxIdleConns       int
	SetMaxOpenConns    int
	LongPollerInterval int64 //轮询时间
}

type ESConfig

type ESConfig struct {
	Addresses             []string
	Username              string
	Password              string
	Timeout               int64
	MaxIdleConnsPerHost   int
	ResponseHeaderTimeout int64
}

func (*ESConfig) NewConnect

func (e *ESConfig) NewConnect(ctx context.Context) (client *elasticsearch.Client, err error)

type PGConfig

type PGConfig struct {
	Clf DBLoginConfig
	Con DbConfigConn
}

func (*PGConfig) NewConnect

func (c *PGConfig) NewConnect(ctx context.Context) (*gorm.DB, error)

type RedisDBConfig

type RedisDBConfig struct {
	Addr         string
	Password     string
	DB           int
	PoolSize     int
	ReadTimeout  int
	DialTimeout  int
	MinIdleConns int //Minimum number of idle connections which is useful when establishing new connection is slow.
}

func (*RedisDBConfig) NewConnect

func (r *RedisDBConfig) NewConnect(ctx context.Context) (client *redis.Client, err error)

Jump to

Keyboard shortcuts

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