Documentation ¶
Index ¶
- type EventReceiver
- type Getter
- type MetaVector
- type MySQL
- type NullEventReceiver
- type Option
- func WithCharset(cs string) Option
- func WithConnectionLifeTimeLimit(dur string) Option
- func WithDB(db string) Option
- func WithDialer(der tcp.Dialer) Option
- func WithDialerFunc(der func(ctx context.Context, addr, port string) (net.Conn, error)) Option
- func WithEventReceiver(er EventReceiver) Option
- func WithHost(host string) Option
- func WithInitialPingDuration(dur string) Option
- func WithInitialPingTimeLimit(lim string) Option
- func WithMaxIdleConns(conns int) Option
- func WithMaxOpenConns(conns int) Option
- func WithName(name string) Option
- func WithPass(pass string) Option
- func WithPort(port int) Option
- func WithTLSConfig(cfg *tls.Config) Option
- func WithTimezone(tz string) Option
- func WithUser(user string) Option
- type Setter
- type TracingEventReceiver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventReceiver ¶ added in v0.0.51
type EventReceiver = dbr.EventReceiver
type MetaVector ¶
type MetaVector interface { GetUUID() string GetVector() []byte GetMeta() string GetIPs() []string }
MetaVector is an interface to handle metadata keep in MySQL.
type MySQL ¶
type NullEventReceiver ¶ added in v0.0.51
type NullEventReceiver = dbr.NullEventReceiver
type Option ¶
type Option func(*mySQLClient) error
Option represents the functional option for mySQLClient.
func WithCharset ¶
WithCharset returns the option to set the charset.
func WithConnectionLifeTimeLimit ¶
WithConnectionLifeTimeLimit returns the option to set the connMaxLifeTime.
func WithDialer ¶
WithDialer returns the option to set the dialer.
func WithDialerFunc ¶ added in v0.0.51
WithDialerFunc returns the option to set the dialer function.
func WithEventReceiver ¶ added in v0.0.51
func WithEventReceiver(er EventReceiver) Option
WithEventReceiver returns the option to set the eventReceiver.
func WithInitialPingDuration ¶
WithInitialPingDuration returns the option to set the initialPingDuration.
func WithInitialPingTimeLimit ¶
WithInitialPingTimeLimit returns the option to set the initialPingTimeLimit.
func WithMaxIdleConns ¶
WithMaxIdleConns returns the option to set the maxIdleConns. If conns is negative numner, no idle connections are retained. ref: https://golang.org/src/database/sql/sql.go?s=24983:25019#L879
func WithMaxOpenConns ¶
WithMaxOpenConns returns the option to set the maxOpenConns. If conns is negative numner, no limit on the number of open connections. ref: https://golang.org/src/database/sql/sql.go?s=24983:25019#L923
func WithTLSConfig ¶
WithTLSConfig returns the option to set the tlsConfig.
func WithTimezone ¶
WithTimezone returns the option to set the timezone.
type Setter ¶
type Setter interface { SetMeta(ctx context.Context, meta MetaVector) error SetMetas(ctx context.Context, metas ...MetaVector) error DeleteMeta(ctx context.Context, uuid string) error DeleteMetas(ctx context.Context, uuids ...string) error SetIPs(ctx context.Context, uuid string, ips ...string) error RemoveIPs(ctx context.Context, ips ...string) error }
type TracingEventReceiver ¶ added in v0.0.51
type TracingEventReceiver = dbr.TracingEventReceiver