distribution

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LeaseTTL = 30 // 租约时间,以秒为单位 	// 节点名称,实际使用时可以根据需要更改
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Campaigner

type Campaigner interface {
	Campaign(context.Context) error
	IsLeader(context.Context) bool
}

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{})

Jump to

Keyboard shortcuts

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