runner

package
v0.0.0-...-535fc81 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = &Options{
	duration:     time.Second * 2,
	timeInterval: time.Minute,
	MaxTimes:     3,
}

Functions

This section is empty.

Types

type Option

type Option func(options *Options)

func WitDuration

func WitDuration(duration time.Duration) Option

func WithMaxTimes

func WithMaxTimes(maxTimes int) Option

func WithTimeInterval

func WithTimeInterval(timeInterval int) Option

type Options

type Options struct {
	MaxTimes int
	// contains filtered or unexported fields
}

type Runner

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

func New

func New(coordinator *coordinator.Coordinator, dao dao.TransactionDao, opts ...Option) *Runner

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) (_ error)

func (*Runner) Stop

func (r *Runner) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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