Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEntClient ¶
func NewEntClient(sqlBackend string, connectionString string, opts ...ClientOption) (*ent.Client, error)
NewEntClient creates an ent client for use in the sqlmetadata store. Valid backends are MYSQL and PSQL.
Types ¶
type ClientOption ¶
type ClientOption func(*clientOptions)
func ClientWithConnMaxLifetime ¶
func ClientWithConnMaxLifetime(connMaxLifetime time.Duration) ClientOption
Congiures a client with the specified max connection lifetime. Default is 3 minutes
func ClientWithMaxIdleConns ¶
func ClientWithMaxIdleConns(maxIdleConns int) ClientOption
Configures a client with the specified max idle connections. Default is 10 connections
func ClientWithMaxOpenConns ¶
func ClientWithMaxOpenConns(maxOpenConns int) ClientOption
Configures a client with the specified max open connections. Default is 100 connections
Click to show internal directories.
Click to hide internal directories.