agentconfig

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package agentconfig loads the standalone peer's secret-bearing files.

Index

Constants

View Source
const MaxTargetsBytes = 64 << 10

Variables

View Source
var (
	ErrUnsafeFile = errors.New("agent config: unsafe file")
	ErrInvalid    = errors.New("agent config: invalid configuration")
)

Functions

func AgentID

func AgentID(dataDir string) (string, error)

AgentID loads or atomically creates the process identity in dataDir.

Types

type Target

type Target struct {
	ID            string `json:"id"`
	Driver        string `json:"driver"`
	DSN           string `json:"dsn"`
	ExplainDriver string `json:"explain_driver,omitempty"`
	ExplainDSN    string `json:"explain_dsn,omitempty"`
}

func LoadTargets

func LoadTargets(path string) ([]Target, error)

LoadTargets reads a strict, owner-only regular file. Errors deliberately identify only the field and entry number; a DSN is never interpolated.

Jump to

Keyboard shortcuts

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