master

package
v0.0.0-...-e961874 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitApiServer

func InitApiServer() (err error)

func InitConfig

func InitConfig(confFile string) (err error)

func InitJobMgr

func InitJobMgr() (err error)

func InitLogMgr

func InitLogMgr() (err error)

func InitWorkerMgr

func InitWorkerMgr() (err error)

*

初始化服务发现

Types

type Config

type Config struct {
	ApiPort               int      `json:"apiPort"`
	ApiReadTimeout        int      `json:"apiReadTimeout"`
	ApiWriteTimeout       int      `json:"apiWriteTimeout"`
	EtcdEndpoints         []string `json:"etcdEndpoints"`
	EtcdDialTimeout       int      `json:"etcdDialTimeout"`
	Webroot               string   `json:"webroot"`
	MongodbUri            string   `json:"mongodbUri"`
	MongodbConnectTimeout int      `json:"mongodbConnectTimeout"`
}
var (
	G_Config *Config
)

配置单例

type JobMgr

type JobMgr struct {
	// contains filtered or unexported fields
}
var (
	// 单例
	G_jobMgr *JobMgr
)

func (*JobMgr) DeleteJob

func (JobMgr *JobMgr) DeleteJob(name string) (oldJob *common.Job, err error)

删除任务

func (*JobMgr) KillJob

func (jobMgr *JobMgr) KillJob(name string) (err error)

强制杀死任务

func (*JobMgr) ListJobs

func (jobMgr *JobMgr) ListJobs() (jobList []*common.Job, err error)

获取任务列表

func (*JobMgr) SaveJob

func (jobMgr *JobMgr) SaveJob(job *common.Job) (oldJob *common.Job, err error)

type LogMgr

type LogMgr struct {
	// contains filtered or unexported fields
}

mongodb日志管理

var (
	G_LogMgr *LogMgr
)

type WorkerMgr

type WorkerMgr struct {
	// contains filtered or unexported fields
}
var (
	G_WorkerMgr *WorkerMgr
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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