woodhouse

package
v0.0.0-...-d5669e0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MultiError

func MultiError(errs []error) error

func TruncateString

func TruncateString(s string, maxLength int) string

Types

type AsyncJobRunner

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

func NewAsyncJobRunner

func NewAsyncJobRunner(logger log.Logger, metricsRegistry prometheus.Registerer, jobTimeout time.Duration, threadCounter *sync.WaitGroup) *AsyncJobRunner

func (*AsyncJobRunner) RunAsyncJob

func (r *AsyncJobRunner) RunAsyncJob(name string, job Job)

type Job

type Job func(ctx context.Context) error

type JobMonitor

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

func NewJobMonitor

func NewJobMonitor(registry *prometheus.Registry, pushGatewayURL string) *JobMonitor

func (*JobMonitor) Run

func (j *JobMonitor) Run(ctx context.Context, jobName string, maxAge time.Duration, job Job) error

Jump to

Keyboard shortcuts

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