Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractJobName ¶
从etcd jobs key中提取JobName 比如:/crontab/jobs/test 得到的jobName是test
func ExtractKillJobName ¶
从etcd kill key中提取jobName 比如:/crontab/kill/test 得到的jobName是test
Types ¶
type WatchHandler ¶
type WatchHandler interface { HandlerGetResponse(getResponse *clientv3.GetResponse) // 监听key之前先 Get一下所有的Key HandlerWatchChan(watchChan clientv3.WatchChan) // 监听事件会有个watchResponse的Channel }
type WatchJobsHandlerDemo ¶
type WatchJobsHandlerDemo struct {
KeyDir string // 监听的key目录
}
func (*WatchJobsHandlerDemo) HandlerGetResponse ¶
func (demo *WatchJobsHandlerDemo) HandlerGetResponse(response *clientv3.GetResponse)
func (*WatchJobsHandlerDemo) HandlerWatchChan ¶
func (demo *WatchJobsHandlerDemo) HandlerWatchChan(watchChan clientv3.WatchChan)
type WatchKillHandlerDemo ¶
type WatchKillHandlerDemo struct { }
监听kill处理器Demo
func (*WatchKillHandlerDemo) HandlerGetResponse ¶
func (demo *WatchKillHandlerDemo) HandlerGetResponse(response *clientv3.GetResponse)
func (*WatchKillHandlerDemo) HandlerWatchChan ¶
func (demo *WatchKillHandlerDemo) HandlerWatchChan(watchChan clientv3.WatchChan)
Click to show internal directories.
Click to hide internal directories.