workerpool

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNodesEmpty = errors.New("worker nodes empty in current env")
)

Functions

This section is empty.

Types

type Option

type Option struct {
	DB               *gorm.DB
	HeartbeatTimeout time.Duration
}

type WorkerPool

type WorkerPool struct {
	// contains filtered or unexported fields
}

func Instance

func Instance() *WorkerPool

func (*WorkerPool) Heartbeat

func (w *WorkerPool) Heartbeat(params view.WorkerHeartbeat)

func (*WorkerPool) Init

func (w *WorkerPool) Init(option Option)

func (*WorkerPool) Select

func (w *WorkerPool) Select(zoneCode string) (node db.WorkerNode, err error)

Jump to

Keyboard shortcuts

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