auperiodictask

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func CreateDefaultConfig

func CreateDefaultConfig() Config

type Coordinator

type Coordinator interface {
	aulocker.Locker

	LastRunTimestamp(
		ctx context.Context,
		key string,
	) (*time.Time, error)

	UpdateLastRunTimestamp(
		ctx context.Context,
		key string,
	) error
}

type PeriodicSingleTaskRunner

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

func NewSingleTaskRunner

func NewSingleTaskRunner(
	ctx context.Context,
	taskKey string,
	taskFunc func(context.Context) error,
	coordinator Coordinator,
	config *Config,
) PeriodicSingleTaskRunner

Jump to

Keyboard shortcuts

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