master

package module
v0.0.0-...-254988c Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 11 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(filename string) (err error)

func InitJobMgr

func InitJobMgr() (err error)

初始化管理器

Types

type ApiServer

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

任务的http接口

var (
	G_apiServer *ApiServer
)

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"`
}

程序配置

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) JobKill

func (jobMgr *JobMgr) JobKill(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)

保存任务到etcd

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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