Documentation ¶
Overview ¶
* * package: dialectors * file: dirlector.go * author: wuzhensheng * create: 2021-06-23 11:52:00 * description: *
* * package: dialectors * file: dirlector.go * author: wuzhensheng * create: 2021-06-23 11:52:00 * description: *
Index ¶
Constants ¶
View Source
const ( DefaultTimeout = 60 * time.Second DefaultIdleTime = 10 * time.Minute DefaultMaxConnPoolSize = 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DialectorConfig ¶
type DialectorConfig struct { Username string `json:"username" yaml:"username"` Password string `json:"password" yaml:"password"` Space string `json:"space" yaml:"space"` Timeout time.Duration `json:"timeout" yaml:"timeout"` IdleTime time.Duration `json:"idle_time" yaml:"idle_time"` MaxConnPoolSize int `json:"max_conn_pool_size" yaml:"max_conn_pool_size"` MinConnPoolSize int `json:"min_conn_pool_size" yaml:"min_conn_pool_size"` Addresses []string `json:"addresses" yaml:"addresses"` }
func (*DialectorConfig) LoadDefault ¶
func (config *DialectorConfig) LoadDefault()
type IDialector ¶
IDialector mock nebula's pool. 取名来自 gorm 的 Dialector.
type NebulaDialector ¶
type NebulaDialector struct {
// contains filtered or unexported fields
}
func MustNewNebulaDialector ¶
func MustNewNebulaDialector(cfg DialectorConfig) *NebulaDialector
MustNewNebulaDialector 语法糖, 必须新建一个 Nebula Dialector
func NewNebulaDialector ¶
func NewNebulaDialector(cfg DialectorConfig) (*NebulaDialector, error)
func (*NebulaDialector) Close ¶
func (d *NebulaDialector) Close()
Click to show internal directories.
Click to hide internal directories.