cron

package
v4.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SMS_QUEUE_NAME   = "/queue/rdb/sms"
	MAIL_QUEUE_NAME  = "/queue/rdb/mail"
	VOICE_QUEUE_NAME = "/queue/rdb/voice"
	IM_QUEUE_NAME    = "/queue/rdb/im"
)

Variables

View Source
var (
	SmsWorkerChan   chan int
	MailWorkerChan  chan int
	VoiceWorkerChan chan int
	ImWorkerChan    chan int
)
View Source
var ReportConfig report.ReportSection

Functions

func CheckDetectorNodes

func CheckDetectorNodes()

func CheckJudge

func CheckJudge() error

func CheckJudgeNodes

func CheckJudgeNodes()

func CheckSnmpDetectorNodes

func CheckSnmpDetectorNodes()

func CleanAggrCalcStraLoop

func CleanAggrCalcStraLoop()

func CleanCollectLoop

func CleanCollectLoop()

func CleanStraLoop

func CleanStraLoop()

func CleanerLoop

func CleanerLoop()

func ConsumeIm

func ConsumeIm()

func ConsumeMail

func ConsumeMail()

func ConsumeSms

func ConsumeSms()

func ConsumeVoice

func ConsumeVoice()

func GetAggrCalcStrategy

func GetAggrCalcStrategy()

func GetJudgeStrategy

func GetJudgeStrategy(cfg StrategySection)

func GetStrategy

func GetStrategy()

func HostUnderNode

func HostUnderNode(nid int64) ([]string, error)

func Init

func Init()

func InitReportHeartBeat

func InitReportHeartBeat(cfg report.ReportSection)

func InitStrategySection

func InitStrategySection(cfg StrategySection)

func InitWorker

func InitWorker(sender map[string]SenderSection)

func RebuildJudgePool

func RebuildJudgePool()

func SendMailBySMTP

func SendMailBySMTP(message *dataobj.Message) error

func SyncAggrCalcStras

func SyncAggrCalcStras()

func SyncApiCollects

func SyncApiCollects()

func SyncCollects

func SyncCollects()

func SyncHardwares

func SyncHardwares()

func SyncIdentsOfNode added in v4.0.4

func SyncIdentsOfNode()

func SyncNodeResources added in v4.0.4

func SyncNodeResources()

func SyncResources added in v4.0.4

func SyncResources()

func SyncSnmpCollects

func SyncSnmpCollects()

func SyncStras

func SyncStras()

func SyncTeamUsers added in v4.0.2

func SyncTeamUsers()

func SyncTeams added in v4.0.2

func SyncTeams()

func SyncTreeNodes added in v4.0.4

func SyncTreeNodes()

func SyncUsers added in v4.0.2

func SyncUsers()

func UpdateJudgeQueue

func UpdateJudgeQueue()

Types

type AggrCalcResp

type AggrCalcResp struct {
	Data []*models.AggrCalc `json:"dat"`
	Err  string             `json:"err"`
}

type SenderSection

type SenderSection struct {
	Way    string `yaml:"way"`
	Worker int    `yaml:"worker"`
	API    string `yaml:"api"`
}

type StraResp

type StraResp struct {
	Data []*models.Stra `json:"dat"`
	Err  string         `json:"err"`
}

type StrasResp

type StrasResp struct {
	Data []*models.Stra `json:"dat"`
	Err  string         `json:"err"`
}

type StrategySection

type StrategySection struct {
	PartitionApi   string `yaml:"partitionApi"`
	Timeout        int    `yaml:"timeout"`
	Token          string `yaml:"token"`
	UpdateInterval int    `yaml:"updateInterval"`
	IndexInterval  int    `yaml:"indexInterval"`
	ReportInterval int    `yaml:"reportInterval"`
	Mod            string `yaml:"mod"`
	EventPrefix    string `yaml:"eventPrefix"`
}
var JudgeStra StrategySection

Jump to

Keyboard shortcuts

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