command

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindConfig

func BindConfig(root *cobra.Command)

func Run

func Run(works []WorkFunc)

Types

type CronJob

type CronJob interface {
	Name() string
	CronSchedule() string
	Run(ctx context.Context, logger *zap.Logger) error
}

type CronRunner

type CronRunner struct {
	Logger *zap.Logger
	Jobs   []CronJob
}

func (*CronRunner) Run

func (s *CronRunner) Run(ctx context.Context) error

type WorkFunc

type WorkFunc func(context.Context) error

Jump to

Keyboard shortcuts

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