xgorm

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 16 Imported by: 1

README

clients

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(config logger.Config, logger xlog.Logger) *xlogger

Types

type Client

type Client struct {
	*gorm.DB
	// contains filtered or unexported fields
}

Client

func New

func New(opt *Option, logger xlog.Logger, metrics metrics.Provider, tracer tracer.Provider) (*Client, error)

func (*Client) DisConnect

func (cli *Client) DisConnect() error

type Option

type Option struct {
	Name            string
	Type            string
	Url             string
	MaxIdleCons     int
	MaxOpenCons     int
	ConnMaxLifetime time.Duration
	ConnMaxIdleTime time.Duration
	EnableTracer    bool
}

mysql client configuration

Jump to

Keyboard shortcuts

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