Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface { GetDbName() string GetDbUser() string GetDbType() string // mysql, cockroachdb, postgres etc... GetLogger() *loggerConfig.Config GetIsEnabled() bool GetResolvers() []Resolver GetOnConnectOptions() ConfigOnConnectOptions GetSelf() Config GetSkipDefaultTransaction() bool GetSearchForAnActiveResolverIfDownPolicy() SearchForAnActiveResolverIfDownPolicy }
this is the main configuration which involves all the other interfaces
type ConfigOnConnectOptions ¶
type ConfigOnConnectOptions interface { GetOnFailedDelayDurationBetweenConnections() time.Duration GetRetryOnFailed() bool GetMaxNrOfRetries() int8 GetRetryDelaySeconds() int8 GetPanicOnFailed() bool }
This is when first connecting...
type Connection ¶
type Connection interface { SetLogger(logger *model.Logger) SetMasterConfig(config interface{}) GetDialector() gorm.Dialector GetReconnectOptions() ReconnectOptions }
type ReconnectOptions ¶
type ReconnectOptions interface { GetIsEnabled() bool GetReconnectAfterSeconds() uint16 GetMaxRetries() int16 }
this is the reconnect options for the resolver & connection
type Resolver ¶
type Resolver interface { GetSources() []Connection GetReplicas() []Connection GetPolicyName() string GetMaxIdleConnections() int GetMaxOpenConnections() int GetConnectionMaxLifeTimeSeconds() uint32 GetConnectionMaxIdleTimeSeconds() uint32 //GetPolicyOptions() dbresolver.Policy GetPolicyOptions() interface{} //SetPolicyOptions(policy dbresolver.Policy) SetPolicyOptions(policy interface{}) GetReconnectOptions() ReconnectOptions GetTables() []string }
this is the resolver
Click to show internal directories.
Click to hide internal directories.