Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct { BroadcastMessageChan chan string // 广播消息channel // contains filtered or unexported fields }
type Client ¶
type Client struct { RemoteAddr string `json:"remote_addr"` // 远端的地址 IsActive bool `json:"is_active"` // 是否是有效的,断开的时候需要设置为false // contains filtered or unexported fields }
连接的客户端
type MessageEvent ¶
type MessageEvent struct { Category string `json:"category"` // 消息分类 Data string `json:"data"` // 数据 }
消息事件 通过消息来判断事件的类型,比如:message, createJob, jobExecute, tryLock, leaseLock, releaseLock,
type WatchJobsHandler ¶
type WatchJobsHandler struct { KeyDir string // 监听的key目录 // contains filtered or unexported fields }
监听etcd中jobs的变化
func (*WatchJobsHandler) HandlerGetResponse ¶
func (watch *WatchJobsHandler) HandlerGetResponse(response *clientv3.GetResponse)
func (*WatchJobsHandler) HandlerWatchChan ¶
func (watch *WatchJobsHandler) HandlerWatchChan(watchChan clientv3.WatchChan)
处理watch
type WatchKillHandler ¶
type WatchKillHandler struct { KeyDir string // 监听的key目录 // contains filtered or unexported fields }
func (*WatchKillHandler) HandlerGetResponse ¶
func (watch *WatchKillHandler) HandlerGetResponse(response *clientv3.GetResponse)
func (*WatchKillHandler) HandlerWatchChan ¶
func (watch *WatchKillHandler) HandlerWatchChan(watchChan clientv3.WatchChan)
type WebsocketController ¶
mvc websocket controller
func (*WebsocketController) Get ¶
func (c *WebsocketController) Get(ctx iris.Context)
func (*WebsocketController) GetClient ¶
func (c *WebsocketController) GetClient(ctx iris.Context)
socket连接
func (*WebsocketController) GetClients ¶
func (c *WebsocketController) GetClients(ctx iris.Context)
查看当前系统中的锁
Click to show internal directories.
Click to hide internal directories.