master

package
v0.0.0-...-dc1a64e Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 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)

func RegisterRouter

func RegisterRouter() *httprouter.Router

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 ErrorJob

type ErrorJob struct {
	Msg string
}

func (*ErrorJob) Error

func (e *ErrorJob) Error() string

type JobMgr

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

任务管理器

var (
	G_jobMgr *JobMgr
)

func (*JobMgr) DelJob

func (jobMgr *JobMgr) DelJob(jobName string) (oldJobs []common.Job, err error)

func (*JobMgr) SaveJob

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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