coordination

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLease = errors.New("coordination: invalid lease")
	// ErrRunLeaseLost reports that the worker executing a run no longer holds
	// the run lease (renewal returned not-held or failed) and must stop
	// executing before another worker reaps or takes over the run. It is kept
	// in this package, not the framework facade, so the runtime engine can
	// classify it without an import cycle; the facade re-exports it.
	ErrRunLeaseLost = errors.New("agentflow: run lease lost")
)

Functions

This section is empty.

Types

type Lease

type Lease struct {
	Key       string
	Owner     string
	ExpiresAt time.Time
}

func (Lease) Validate

func (lease Lease) Validate() error

type Locker

type Locker interface {
	Acquire(ctx context.Context, key string, owner string, ttl time.Duration) (Lease, bool, error)
	Renew(ctx context.Context, lease Lease, ttl time.Duration) (Lease, bool, error)
	Release(ctx context.Context, lease Lease) error
}

Jump to

Keyboard shortcuts

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