Documentation
¶
Index ¶
- Variables
- func EnsurePortsAvailable(action string, ports []PortSpec) error
- func GetProductionServices() []string
- func IsServiceActive(service string) (bool, error)
- func IsServiceEnabled(service string) (bool, error)
- func IsServiceMasked(service string) (bool, error)
- func NormalizePeers(peersStr string) ([]string, error)
- func ResolveServiceName(alias string) ([]string, error)
- func ShowDryRunSummary(vpsIP, domain, branch string, peers []string, joinAddress string, ...)
- func ValidateDNSRecord(domain, expectedIP string) error
- func ValidateGeneratedConfig(oramaDir string) error
- type IPFSClusterPeerInfo
- type IPFSPeerInfo
- type PortSpec
Constants ¶
This section is empty.
Variables ¶
var ErrServiceNotFound = errors.New("service not found")
var ServicePorts = map[string][]PortSpec{
"debros-gateway": {
{Name: "Gateway API", Port: 6001},
},
"debros-olric": {
{Name: "Olric HTTP", Port: 3320},
{Name: "Olric Memberlist", Port: 3322},
},
"debros-node": {
{Name: "RQLite HTTP", Port: 5001},
{Name: "RQLite Raft", Port: 7001},
},
"debros-ipfs": {
{Name: "IPFS API", Port: 4501},
{Name: "IPFS Gateway", Port: 8080},
{Name: "IPFS Swarm", Port: 4101},
},
"debros-ipfs-cluster": {
{Name: "IPFS Cluster API", Port: 9094},
},
}
Functions ¶
func EnsurePortsAvailable ¶
EnsurePortsAvailable checks if the specified ports are available
func GetProductionServices ¶
func GetProductionServices() []string
GetProductionServices returns a list of all DeBros production service names that exist
func IsServiceActive ¶
IsServiceActive checks if a systemd service is currently active (running)
func IsServiceEnabled ¶
IsServiceEnabled checks if a systemd service is enabled to start on boot
func IsServiceMasked ¶
IsServiceMasked checks if a systemd service is masked
func NormalizePeers ¶
NormalizePeers normalizes and validates peer multiaddrs
func ResolveServiceName ¶
ResolveServiceName resolves service aliases to actual systemd service names
func ShowDryRunSummary ¶
func ShowDryRunSummary(vpsIP, domain, branch string, peers []string, joinAddress string, isFirstNode bool, oramaDir string)
ShowDryRunSummary displays what would be done during installation without making changes
func ValidateDNSRecord ¶
ValidateDNSRecord validates that the domain points to the expected IP address Returns nil if DNS is valid, warning message if DNS doesn't match but continues, or error if DNS lookup fails completely
func ValidateGeneratedConfig ¶
ValidateGeneratedConfig loads and validates the generated node configuration
Types ¶
type IPFSClusterPeerInfo ¶
IPFSClusterPeerInfo contains IPFS Cluster peer information for cluster discovery
type IPFSPeerInfo ¶
IPFSPeerInfo holds IPFS peer information for configuring Peering.Peers
type PortSpec ¶
PortSpec defines a port and its name for checking availability
func CollectPortsForServices ¶
CollectPortsForServices returns a list of ports used by the specified services
func DefaultPorts ¶
func DefaultPorts() []PortSpec
DefaultPorts is used for fresh installs/upgrades before unit files exist.