config

package
v3.15.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "0.0.1"
)

change log: deprecated

Variables

View Source
var ApiClient apiClients

Functions

func CloseDB

func CloseDB() (err error)

func Init

func Init()

func InitDB

func InitDB(loggerlevel bool) (err error)

func InitLog

func InitLog(level string) (err error)

func PutAlarmToRedis

func PutAlarmToRedis(body string) error

func SetBucketKey

func SetBucketKey(key string)

func SetLogLevel

func SetLogLevel(loggerlevel bool)

func StartRedis

func StartRedis(enable bool, addr string, password string, bucketkey string)

Types

type DBPool

type DBPool struct {
	Falcon    *gorm.DB
	Graph     *gorm.DB
	Uic       *gorm.DB
	Dashboard *gorm.DB
	Alarm     *gorm.DB
	IMDB      *gorm.DB

	//fastweb only
	Boss *gorm.DB
}

func Con

func Con() DBPool

func (DBPool) HealthCheck

func (db DBPool) HealthCheck() (errorBool int, errorTable []string)

type RedisConn

type RedisConn struct {
	Conn *redis.Client
	// default extend bucket key of external alarms
	DefualtBucketKey string
	Enable           bool
}

func GetRedisConn

func GetRedisConn() RedisConn

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL