clientconfig

package
v0.2.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package clientconfig stores the local management credentials used by the bundled CLI and TUI. The profile is deliberately limited to loopback management addresses because vmflow's control listener is local-only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPath

func DefaultPath() (string, error)

DefaultPath returns the client profile path. VMFLOW_CLIENT_CONFIG is mainly useful for isolated deployments and tests; relative overrides are rejected.

func Save

func Save(path string, profile Profile) error

Save atomically writes a client profile with mode 0600.

Types

type Profile

type Profile struct {
	Version    int    `yaml:"version"`
	Address    string `yaml:"address"`
	Token      string `yaml:"token"`
	ConfigPath string `yaml:"config_path,omitempty"`
}

Profile identifies one local daemon and the bearer token used to manage it.

func Load

func Load(path string) (Profile, error)

Load reads and validates a client profile without following a symlink at the final path component.

func LoadDefault

func LoadDefault() (Profile, string, error)

LoadDefault loads the default profile and returns its resolved path.

Jump to

Keyboard shortcuts

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