master

package
v0.0.0-...-875b246 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IninConfig

func IninConfig(filename string) (err error)

加载配置

func InitApiServer

func InitApiServer() (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) 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