config

package
v0.83.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: BSD-3-Clause Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	EnvDisableSSHConfig = "NB_DISABLE_SSH_CONFIG"

	EnvForceSSHConfig = "NB_FORCE_SSH_CONFIG"

	MaxPeersForSSHConfig = 200
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles SSH client configuration for NetBird peers

func New

func New() *Manager

New creates a new SSH config manager

func (*Manager) GetSSHConfigDir

func (m *Manager) GetSSHConfigDir() string

GetSSHConfigDir returns the SSH config directory path

func (*Manager) GetSSHConfigFile

func (m *Manager) GetSSHConfigFile() string

GetSSHConfigFile returns the SSH config file name

func (*Manager) RemoveSSHClientConfig

func (m *Manager) RemoveSSHClientConfig() error

RemoveSSHClientConfig removes NetBird SSH configuration

func (*Manager) SetupSSHClientConfig

func (m *Manager) SetupSSHClientConfig(peers []PeerSSHInfo) error

SetupSSHClientConfig creates SSH client configuration for NetBird peers

type PeerSSHInfo

type PeerSSHInfo struct {
	Hostname string
	IP       netip.Addr
	IPv6     netip.Addr
	FQDN     string
}

PeerSSHInfo represents a peer's SSH configuration information

type ShutdownState

type ShutdownState struct {
	SSHConfigDir  string
	SSHConfigFile string
}

ShutdownState represents SSH configuration state that needs to be cleaned up.

func (*ShutdownState) Cleanup

func (s *ShutdownState) Cleanup() error

Cleanup removes SSH client configuration files.

func (*ShutdownState) Name

func (s *ShutdownState) Name() string

Name returns the state name for the state manager.

Jump to

Keyboard shortcuts

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