Documentation
¶
Index ¶
- func InitApiServer() (err error)
- func InitConfig(filePath string) (err error)
- func InitJobManage() (err error)
- func InitLogManage() (err error)
- func InitWorkManage() (err error)
- type ApiServer
- type Config
- type JobManage
- func (jobManage *JobManage) DeleteJob(jobName string) (oldJob *common.Job, err error)
- func (jobManage *JobManage) KillJob(jobName string) (err error)
- func (jobManage *JobManage) ListJob() (jobList []*common.Job, err error)
- func (jobManage *JobManage) SaveJob(job *common.Job) (oldJob *common.Job, err error)
- type LogManage
- type WorkManage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
)
单例
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
)
Click to show internal directories.
Click to hide internal directories.