deviceownership

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: GPL-3.0 Imports: 11 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

Overview

Package deviceownership prevents multiple bsbctl daemons from writing to the same BUSY Bar application namespace at the same time.

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyOwned = errors.New("device application is already owned")

ErrAlreadyOwned reports that another bsbctl daemon currently owns the device/application pair.

Functions

This section is empty.

Types

type ConflictError

type ConflictError struct {
	OwnerPID int
}

ConflictError carries the safe portion of the current owner's identity. Device addresses and credentials never appear in this error.

func (*ConflictError) Error

func (err *ConflictError) Error() string

func (*ConflictError) Unwrap

func (err *ConflictError) Unwrap() error

type Lease

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

Lease holds exclusive ownership until Close or process exit.

func Acquire

func Acquire(baseURL, application string) (*Lease, error)

Acquire obtains the per-user, process-lifetime device/application lease. The location is intentionally independent of daemon config and socket paths.

func (*Lease) Close

func (lease *Lease) Close() error

Close releases the lease. It is safe to call more than once.

Jump to

Keyboard shortcuts

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