Documentation ¶
Index ¶
- Constants
- Variables
- func InitLog(level string) (err error)
- func InitRedisConnPool()
- func JudgeIsLongInt(input string) (res bool)
- func Link(event *cmodel.Event) string
- func ModLink(event *cmodel.Event) string
- func ModUicLink(uic string) string
- func ParseConfig(cfg string)
- func PingRedis(c redis.Conn, t time.Time) error
- type ApiConfig
- type FalconPortalConfig
- type GlobalConfig
- type HousekeeperConfig
- type HttpConfig
- type RedisConfig
- type WorkerConfig
Constants ¶
View Source
const ( VERSION = "0.2.0" CacheTTl = time.Minute * 30 BYTEMAIL = "@xxx.com" BLOCK_MONITOR_SET = "block_monitor_set" BLOCK_MONITOR_KEY_PREFIX = "single_block_monitor_" )
Variables ¶
View Source
var (
ConfigFile string
)
View Source
var RedisConnPool *redis.Pool
Functions ¶
func InitRedisConnPool ¶
func InitRedisConnPool()
func JudgeIsLongInt ¶
func ModUicLink ¶
func ParseConfig ¶
func ParseConfig(cfg string)
Types ¶
type ApiConfig ¶
type ApiConfig struct { Sms string `json:"sms"` Mail string `json:"mail"` Phone string `json:"phone"` Dashboard string `json:"dashboard"` PlusApi string `json:"plus_api"` MainApi string `json:"main_api"` PlusApiToken string `json:"plus_api_token"` IM string `json:"im"` LarkTenantAccessTokenUrl string `json:"lark_tenant_access_token_url"` }
type FalconPortalConfig ¶
type GlobalConfig ¶
type GlobalConfig struct { LogLevel string `json:"log_level"` FalconPortal *FalconPortalConfig `json:"falcon_portal"` Http *HttpConfig `json:"http"` Redis *RedisConfig `json:"redis"` Api *ApiConfig `json:"api"` Worker *WorkerConfig `json:"worker"` Housekeeper *HousekeeperConfig `json:"Housekeeper"` //LarkConfig *LarkConfig `json:"lark_config"` LarkBotTokens []string `json:"lark_bot_tokens"` AlarmRetryTimes int `json:"alarm_retry_times"` AlarmApi string `json:"alarm_api"` }
func Config ¶
func Config() *GlobalConfig
type HousekeeperConfig ¶
type HttpConfig ¶
type RedisConfig ¶
type RedisConfig struct { Addr string `json:"addr"` RedisClusterNodes []string `json:"redis_cluster_nodes"` MaxIdle int `json:"maxIdle"` HighQueues []string `json:"highQueues"` LowQueues []string `json:"lowQueues"` UserIMQueue string `json:"userIMQueue"` UserSmsQueue string `json:"userSmsQueue"` UserMailQueue string `json:"userMailQueue"` }
Click to show internal directories.
Click to hide internal directories.