Documentation ¶
Index ¶
- Constants
- type Campaigner
- type ServerNode
- func (sn *ServerNode) Campaign(ctx context.Context)
- func (sn *ServerNode) KeepAlive(ctx context.Context)
- func (sn *ServerNode) Shuffle(ctx context.Context)
- func (sn *ServerNode) WatchCronmap(ctx context.Context, sem chan<- struct{}, ch chan<- struct{})
- func (sn *ServerNode) WatchDags(ctx context.Context)
- func (sn *ServerNode) WatchHealth(ctx context.Context, ch chan<- struct{})
Constants ¶
View Source
const (
LeaseTTL = 30 // 租约时间,以秒为单位 // 节点名称,实际使用时可以根据需要更改
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Campaigner ¶
type ServerNode ¶
type ServerNode struct { ServerName string // contains filtered or unexported fields }
func GetServerNode ¶
func GetServerNode() *ServerNode
func NewServerNode ¶
func NewServerNode() (*ServerNode, error)
func (*ServerNode) Campaign ¶
func (sn *ServerNode) Campaign(ctx context.Context)
func (*ServerNode) KeepAlive ¶
func (sn *ServerNode) KeepAlive(ctx context.Context)
func (*ServerNode) Shuffle ¶
func (sn *ServerNode) Shuffle(ctx context.Context)
func (*ServerNode) WatchCronmap ¶
func (sn *ServerNode) WatchCronmap(ctx context.Context, sem chan<- struct{}, ch chan<- struct{})
func (*ServerNode) WatchDags ¶
func (sn *ServerNode) WatchDags(ctx context.Context)
func (*ServerNode) WatchHealth ¶
func (sn *ServerNode) WatchHealth(ctx context.Context, ch chan<- struct{})
Click to show internal directories.
Click to hide internal directories.