busdiscover

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 10 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 busdiscover enumerates live bus daemons via per-AppID PID files protected by a process-lifetime advisory lock.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handle

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

Handle keeps the lifetime lock fd alive; OS releases on process exit.

func WritePIDFile

func WritePIDFile(eventsDir string, pid int) (*Handle, error)

WritePIDFile takes the alive lock and atomically writes pid + RFC3339 start time. Returns lockfile.ErrHeld if another bus holds the lock.

func (*Handle) Release

func (h *Handle) Release() error

Release is for tests only; production lets process exit release the lock.

type Process

type Process struct {
	PID       int
	AppID     string
	StartTime time.Time
}

type Scanner

type Scanner interface {
	ScanBusProcesses() ([]Process, error)
}

func Default

func Default() Scanner

Jump to

Keyboard shortcuts

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