handlerattempt

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attempt

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

func New

func New(opts Options) (*Attempt, error)

func (*Attempt) Run

func (o *Attempt) Run(ctx context.Context) (bool, error)

type MetricsReporter

type MetricsReporter interface {
	handlercommand.MetricsReporter
}

type Options

type Options struct {
	Logger  *zap.Logger
	Config  *config.Handler
	Journal *journal.Journal

	// Path to the changed file.
	ChangedFile string

	// Directory for storing execution-related files.
	BaseDir string

	// Whether the attempt is the last one before giving up.
	Final bool

	// Function to acquire a lock preventing concurrent file changes by handler
	// logic.
	AcquireLock func()

	// Interface for reporting metrics.
	Metrics MetricsReporter
}

Jump to

Keyboard shortcuts

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