labelgen

package
v0.75.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: BSD-3-Clause, AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package labelgen produces DNS-safe Agent Network subdomain labels.

Package labelgen produces DNS-safe Agent Network subdomain labels.

The wordlist below is a curated subset drawn from public-domain nature / common-noun pools (e.g. EFF's diceware lists). Every entry is lowercase ASCII, 4–12 chars, no hyphens, no digits, and was hand-checked to avoid offensive, brand, or region-specific terms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PickUnique

func PickUnique(rng *rand.Rand, taken map[string]struct{}, fallbackSuffix string) string

PickUnique selects a label not already in `taken`. It tries up to pickAttempts random picks; on exhaustion it scans the deduplicated wordlist for any remaining free entry, and if none is left appends `-<fallbackSuffix>` to a deterministic word and returns. The caller is responsible for seeding rng (math/rand).

Types

This section is empty.

Jump to

Keyboard shortcuts

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