Documentation ¶
Index ¶
- Constants
- Variables
- func CheckMsSql()
- func CheckMySQL()
- func CheckMySql()
- func CheckPqsql()
- func GetConfigInt(name string) int
- func GetConfigString(name string) string
- func GetConsulServiceURL(serviceName string) string
- func GetMongoConnection(dbName ...string) (*mgo.Database, error)
- func GetMySQLConnection(dbName ...string) (*gorm.DB, error)
- func GetMysqlConnection() *gorm.DB
- func GetNacosServiceURL(servicename string) (string, string)
- func GetRedisConnection(dbName ...string) (*redis.Client, error)
- func InitConfig(cf string)
- func MgoCheck()
- func RabbitCreateDeadLetterQueue(queueName, toQueueName string, ttl int)
- func RabbitCreateNewQueue(queueName string)
- func RabbitMessageListener(queueName string, listener func(msg []byte))
- func RabbitSendMessage(queueName string, msg string)
- func RedisCheck()
- func ReturnMongoConnection(conn *mgo.Database)
- func ReturnMysqlConnection(conn *gorm.DB)
- func SafeExit()
- type MsgHandler
- type Service
Constants ¶
View Source
const AUTO_CHECK_MINUTES = 30 //自动检查连接间隔时间,单位为分钟
Variables ¶
View Source
var Consul *api.Client
View Source
var CouchDB *gocb.Cluster
View Source
var Elastic *elastic.Client
View Source
var HBase gohbase.Client
View Source
var Influxdb influxdb2.Client
View Source
var InfluxdbBucket, InfluxdbOrg string
View Source
var Kafka = &kafka{}
View Source
var Mssql *gorm.DB
View Source
var Mysql *gorm.DB
View Source
var Nacos naming_client.INamingClient
View Source
var Postgres *gorm.DB
Functions ¶
func CheckMsSql ¶
func CheckMsSql()
func CheckMySQL ¶
func CheckMySQL()
func CheckMySql ¶
func CheckMySql()
func CheckPqsql ¶
func CheckPqsql()
func GetConfigInt ¶
func GetConfigString ¶
func GetConsulServiceURL ¶
func GetMongoConnection ¶
func GetMysqlConnection ¶
func GetNacosServiceURL ¶
func InitConfig ¶
func InitConfig(cf string)
func RabbitCreateNewQueue ¶
func RabbitCreateNewQueue(queueName string)
func RabbitMessageListener ¶
func RabbitSendMessage ¶
func RedisCheck ¶
func RedisCheck()
func ReturnMongoConnection ¶
func ReturnMongoConnection(conn *mgo.Database)
func ReturnMysqlConnection ¶
Types ¶
type MsgHandler ¶
func (MsgHandler) Cleanup ¶
func (MsgHandler) Cleanup(_ sarama.ConsumerGroupSession) error
func (MsgHandler) ConsumeClaim ¶
func (h MsgHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
func (MsgHandler) Setup ¶
func (MsgHandler) Setup(_ sarama.ConsumerGroupSession) error
Click to show internal directories.
Click to hide internal directories.