idgen

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package idgen produces opaque, near-unique identifiers for plugins, transports, and any other LogLayer machinery that needs a stable handle when the caller didn't supply one. Every ID is `prefix + 12 hex chars` from crypto/rand, with a process-counter fallback if the OS RNG fails.

Index

Constants

View Source
const (
	PluginPrefix    = "auto-plugin-"
	TransportPrefix = "auto-transport-"
)

Prefixes used by LogLayer's built-in auto-ID call sites. Tests and tooling can match against them to recognize an auto-generated ID.

Variables

This section is empty.

Functions

func Random

func Random(prefix string) string

Random returns prefix concatenated with 12 hex chars from crypto/rand.

Types

This section is empty.

Jump to

Keyboard shortcuts

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