connector

package
v0.0.0-...-d77ad8a Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeZone = "UTC"
	PoolConnectMin  = 1
	PoolConnectMax  = 1
)

Variables

This section is empty.

Functions

func NewConnect

func NewConnect(...[]AuthOption)

Types

type AuthOption

type AuthOption struct {
	Url      string
	UserName string
	Password string
}

type ConnectConfig

type ConnectConfig struct {
	// contains filtered or unexported fields
}

func NewConnectorConfig

func NewConnectorConfig() *ConnectConfig

type ConnectHandle

type ConnectHandle struct {
	DB      *sql.DB
	Session *sql.Conn
}

type ConnectOption

type ConnectOption func(*ConnectConfig) error

func SetCacheSize

func SetCacheSize(cacheSize uint64) ConnectOption

type LogAuth

type LogAuth struct {
	Auth  AuthOption
	Conn  map[int]*ConnectHandle
	State string
}

type LogMinterConnector

type LogMinterConnector struct {
	Auth     [7]*LogAuth // 最大支持7个线程
	Parallel int8        // 线程并发数, 默认4个
	Threads  int8        // 当前建立的线程
}

func (*LogMinterConnector) SetDefault

func (c *LogMinterConnector) SetDefault(a AuthOption, tz string)

Jump to

Keyboard shortcuts

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