mysql

package
v0.0.0-...-2bd70a3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(cfg Config, opts ...Option) (Client, func())

func (Client) PerformanceStats

func (c Client) PerformanceStats()

func (Client) WithContext

func (c Client) WithContext(ctx context.Context) Client

type Config

type Config struct {
	Conn        string
	DBName      string
	MaxLifeTime int
	MaxIdleConn int
	MaxOpenConn int
}

type Option

type Option func(db *Client)

func WithLogger

func WithLogger(logger log.Logger) Option

func WithMonitor

func WithMonitor(able bool, interval time.Duration) Option

func WithTracer

func WithTracer(tracer opentracing.Tracer) Option

Jump to

Keyboard shortcuts

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