guardenrollment

package
v0.57.5 Latest Latest
Warning

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

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

Documentation

Overview

Package guardenrollment reads the Techstack Guard enrollment of this node: the server and worker the Guard was enrolled for. StackKits never imports Techstack; it reads the enrollment file the Guard keeps on the host, so a credential or a link can be bound to this node's own Guard identity and never to one a request names.

Index

Constants

This section is empty.

Variables

View Source
var ErrAbsent = errors.New("guardenrollment: this node has no Techstack Guard enrollment")

ErrAbsent means this node has no readable Guard enrollment.

View Source
var Paths = []string{
	"/etc/techstack/agent-enrollment.json",
	"/var/lib/techstack/guard/agent-enrollment.json",
}

Paths are where a Guard keeps its enrollment; the first readable one wins.

Functions

This section is empty.

Types

type Enrollment

type Enrollment struct {
	ServerID string
	WorkerID string
}

Enrollment is the Guard identity of this node.

func Read

func Read() (Enrollment, error)

Read returns the Guard enrollment of this node, or ErrAbsent.

func (Enrollment) Identity

func (e Enrollment) Identity() string

Identity is the Guard identity as one string: "guard:<server>/<worker>".

Jump to

Keyboard shortcuts

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