nodeid

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultOperatorPath  = "/etc/deck/node-id"
	DefaultGeneratedPath = "/var/lib/deck/node-id"
)

Variables

This section is empty.

Functions

func Validate

func Validate(id string) error

Types

type Paths

type Paths struct {
	OperatorPath  string
	GeneratedPath string
}

func DefaultPaths

func DefaultPaths() Paths

type Result

type Result struct {
	ID             string
	Source         Source
	Hostname       string
	OperatorID     string
	GeneratedID    string
	Mismatch       bool
	GeneratedIDNew bool
}

func Init

func Init(paths Paths) (Result, error)

func Resolve

func Resolve(paths Paths) (Result, error)

func SetOperator

func SetOperator(paths Paths, id string) (Result, error)

type Source

type Source string
const (
	SourceOperator     Source = "operator"
	SourceGenerated    Source = "generated"
	SourceGeneratedNew Source = "generated-new"
)

Jump to

Keyboard shortcuts

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