builder

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyTaskName      = errors.New("task name is nil")
	ErrTaskIntervalIsZero = errors.New("task interval is zero")
	ErrInvalidTimeFormat  = errors.New("invalid time format")
)

Functions

This section is empty.

Types

type Builder

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

func New

func New(runner Runner, count uint) *Builder

func (*Builder) Interval

func (b *Builder) Interval(interval time.Duration) *Do

func (*Builder) Minute

func (b *Builder) Minute() *Do

func (*Builder) Seconds

func (b *Builder) Seconds() *Do

func (*Builder) Time

func (b *Builder) Time(time string) *Do

type Do

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

func (*Do) Do

func (d *Do) Do(ctx context.Context, name string, handler func()) error

type Runner

type Runner interface {
	Run(ctx context.Context, task models.Task) error
}

Directories

Path Synopsis
Package mock_builder is a generated GoMock package.
Package mock_builder is a generated GoMock package.

Jump to

Keyboard shortcuts

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