scheduler

package
v0.0.0-...-848b2d1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler

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

Scheduler takes steps and executes them

func New

func New(logger *zap.Logger) *Scheduler

New returns a new scheduler

func (*Scheduler) MustExecute

func (s *Scheduler) MustExecute(ctx context.Context, steps Steps)

MustExecute takes steps and executes them

type Step

type Step struct {
	Name string
	Do   StepFunc
}

Defines contract for scheduler

type StepFunc

type StepFunc func(ctx context.Context) error

Defines contract for scheduler

type Steps

type Steps []Step

Defines contract for scheduler

Jump to

Keyboard shortcuts

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