poller

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDataLock = errors.New("Data Lock Error")

Functions

This section is empty.

Types

type Metric

type Metric interface {
	IncBusyWorker() int64
	DecBusyWorker() int64
	BusyWorkers() int64
}

Metric interface

func NewMetric

func NewMetric() Metric

NewMetric for default metric structure

type Poller

type Poller struct {
	Client   client.Client
	Dispatch func(context.Context, *runnerv1.Task) error

	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(cli client.Client, dispatch func(context.Context, *runnerv1.Task) error, cfg *config.Config) *Poller

func (*Poller) Poll

func (p *Poller) Poll(ctx context.Context) error

func (*Poller) Wait

func (p *Poller) Wait()

Jump to

Keyboard shortcuts

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