graphlock

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Overview

Package graphlock serializes terragraph plan/apply/destroy across machines with a remote lock object. Same-checkout races stay on internal/runlock.

Index

Constants

This section is empty.

Variables

View Source
var ErrHeld = errors.New("another terragraph process holds the graph lock")

ErrHeld is returned when the graph lock object already exists.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Matches(lock *blueprint.Lock) bool
	Acquire(ctx context.Context, lock *blueprint.Lock) (Held, error)
}

Backend acquires a graph lock for one nested lock type.

type Held

type Held interface {
	Close() error
}

Held is a held graph lock. Close releases it. Close on a nil or already-released Held is a no-op.

func Acquire

func Acquire(ctx context.Context, lock *blueprint.Lock) (Held, error)

Acquire takes the graph lock described by lock. A nil lock is a no-op.

Jump to

Keyboard shortcuts

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