semanticlock

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidDatabaseID = errors.New("invalid semantic database ID")
	ErrLeaseClosed       = errors.New("semantic lock lease is closed")
)

Functions

This section is empty.

Types

type AcquireError

type AcquireError struct {
	Family Family
	Mode   Mode
	Path   string
	// contains filtered or unexported fields
}

func (*AcquireError) Error

func (e *AcquireError) Error() string

func (*AcquireError) Unwrap

func (e *AcquireError) Unwrap() error

type ExclusiveMaintenanceLease

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

func (*ExclusiveMaintenanceLease) AcquireGenerationExclusive

func (l *ExclusiveMaintenanceLease) AcquireGenerationExclusive(ctx context.Context, metadata string) (*Lease, error)

func (*ExclusiveMaintenanceLease) Close

func (l *ExclusiveMaintenanceLease) Close() error

func (*ExclusiveMaintenanceLease) Family

func (l *ExclusiveMaintenanceLease) Family() Family

func (*ExclusiveMaintenanceLease) Mode

func (l *ExclusiveMaintenanceLease) Mode() Mode

func (*ExclusiveMaintenanceLease) Path

type Family

type Family string
const (
	FamilyMaintenance Family = "maintenance"
	FamilyGeneration  Family = "generation"
)

type Lease

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

func (*Lease) Close

func (l *Lease) Close() error

func (*Lease) Family

func (l *Lease) Family() Family

func (*Lease) Mode

func (l *Lease) Mode() Mode

func (*Lease) Path

func (l *Lease) Path() string

type Mode

type Mode string
const (
	ModeShared    Mode = "shared"
	ModeExclusive Mode = "exclusive"
)

type Scope

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

func NewScope

func NewScope(cacheDir string, databaseID string) (*Scope, error)

func (*Scope) AcquireGenerationShared

func (s *Scope) AcquireGenerationShared(ctx context.Context, metadata string) (*Lease, error)

func (*Scope) AcquireMaintenanceExclusive

func (s *Scope) AcquireMaintenanceExclusive(ctx context.Context, metadata string) (*ExclusiveMaintenanceLease, error)

func (*Scope) AcquireMaintenanceShared

func (s *Scope) AcquireMaintenanceShared(ctx context.Context, metadata string) (*Lease, error)

Jump to

Keyboard shortcuts

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