host

package
v0.0.0-...-3b090a4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package host gives Bee's components a read-only view of nonsecret host facts: the running Bee executable, the home and working folders, the names (never the values) of the environment variables, the identity of the machine's current boot, and the absolute path of an installed executable by its bare name. Drivers locate the harnesses installed on the machine through it, generated hooks call back into the same Bee instead of finding another one on PATH, and placement proves that a process of an earlier boot is gone. Its hostprocess Lua module reports whether a recorded process group still has members, so placement also proves that a child tree of the current boot is gone.

Index

Constants

View Source
const ObserveGroupAction = "hostprocess.observe_group"

ObserveGroupAction is the permission to ask whether a process group still has members; the resource is the decimal process group id.

View Source
const StorageID = "bee.harness.host:environment"

StorageID is the environment storage the host facts are read through.

Variables

View Source
var ProcessModule = &luaapi.ModuleDef{
	Name: "hostprocess", Description: "Membership of recorded host process groups",
	Class: []string{luaapi.ClassIO, luaapi.ClassNondeterministic},
	Build: buildProcessModule, Types: processModuleTypes,
}

ProcessModule lets a component prove that a process group it recorded has no members left. A group id stays allocated while any process belongs to the group, so an empty group can never be refilled under the same id by the recorded tree. A present group proves nothing about which processes are in it.

Functions

This section is empty.

Types

type Component

type Component struct{}

Component registers the host environment storage and the process group module at boot.

func New

func New() *Component

New returns the host environment component.

func (*Component) DependsOn

func (*Component) DependsOn() []string

DependsOn implements boot.Component: the storage registers into the environment registry the env component creates, and the module into the Lua engine.

func (*Component) Load

func (*Component) Load(ctx context.Context) (context.Context, error)

Load implements boot.Component: it registers the storage before the registry's environment variables are read.

func (*Component) Name

func (*Component) Name() string

Name implements boot.Component.

func (*Component) Start

func (*Component) Start(context.Context) error

Start implements boot.Component.

func (*Component) Stop

func (*Component) Stop(context.Context) error

Stop implements boot.Component.

Jump to

Keyboard shortcuts

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