master

package
v0.0.0-...-c8bda3e Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 13 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(filePath string) (err error)

初始化配置信息

func InitJobManage

func InitJobManage() (err error)

初始化

func InitLogManage

func InitLogManage() (err error)

初始化

func InitWorkManage

func InitWorkManage() (err error)

初始化

Types

type ApiServer

type ApiServer struct {
	// contains filtered or unexported fields
}
var (
	G_ApiServer *ApiServer
)

单例

type Config

type Config struct {

	// ==http 配置
	// 端口
	ApiPort int `json:"apiPort"`
	// 读超时
	ReadTimeOut int `json:"readTimeOut"`
	// 写超时
	WriteTimeOut int `json:"writeTimeOut"`
	// http服务器,静态页面跟目录
	WebRoot string `json:"webRoot"`

	// ==etcd配置
	// 集群
	EtcdEndPoints []string `json:"etcdEndPoints"`
	// etcd连接超时
	EtcdDialTimeout int `json:"etcdDialTimeout"`
}
var (
	G_config *Config
)

type JobManage

type JobManage struct {
	// etcd 客户端
	ETCDClient *clientv3.Client
	// etcd kv操作资源
	ETCDkv clientv3.KV
	// etcd 租约
	ETCDLease clientv3.Lease
}

任务管理

var (
	G_jobManage *JobManage
)

单例

func (*JobManage) DeleteJob

func (jobManage *JobManage) DeleteJob(jobName string) (oldJob *common.Job, err error)

删除任务

func (*JobManage) KillJob

func (jobManage *JobManage) KillJob(jobName string) (err error)

杀死任务

func (*JobManage) ListJob

func (jobManage *JobManage) ListJob() (jobList []*common.Job, err error)

任务列表

func (*JobManage) SaveJob

func (jobManage *JobManage) SaveJob(job *common.Job) (oldJob *common.Job, err error)

type LogManage

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

日志管理对象

var (
	G_logManage *LogManage
)

type WorkManage

type WorkManage struct {
	// etcd 客户端
	ETCDClient *clientv3.Client
	// etcd kv操作资源
	ETCDkv clientv3.KV
}

work节点 服务发现

var (
	G_workManage *WorkManage
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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