lock

package
v0.0.0-...-626fa6c Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package lock implements a locking mechanism on shared resources to ensure they don't get used at the same time. There needs to be a lock for the following: - VM on Host: A VM must only exist on one host at a time - Storage attached to VM: Block storage can only be attached to one VM at a time

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lockable

type Lockable interface {
	Locked() bool
	HeldBy() Locker
}

Lockable interface must be attached to lockable resources, such as Virtual Machines, block devices, and host devices that can be attached to virtual machines.

type Locker

type Locker interface {
	Lock(Lockable) error
	Unlock(Lockable) error
}

Locker interface used to lock and unlock Lockable resources

Jump to

Keyboard shortcuts

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