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 ShowDryRunSummaryWithRelay(vpsIP, domain, branch string, peers []string, joinAddress string, ...)
- func StartServicesOrdered(services []string, action string)
- func ValidateDNSRecord(domain, expectedIP string) error
- func ValidateGeneratedConfig(oramaDir string) error
- type AnyoneRelayDryRunInfo
- type IPFSClusterPeerInfo
- type IPFSPeerInfo
- type PortSpec
Constants ¶
This section is empty.
Variables ¶
var ErrServiceNotFound = errors.New("service not found")
var NamespaceServiceOrder = []string{"rqlite", "olric", "gateway"}
NamespaceServiceOrder defines the dependency order for namespace services. RQLite must start first (database), then Olric (cache), then Gateway (depends on both).
var ServicePorts = map[string][]PortSpec{ "debros-gateway": { {Name: "Gateway API", Port: constants.GatewayAPIPort}, }, "debros-olric": { {Name: "Olric HTTP", Port: constants.OlricHTTPPort}, {Name: "Olric Memberlist", Port: constants.OlricMemberlistPort}, }, "debros-node": { {Name: "RQLite HTTP", Port: constants.RQLiteHTTPPort}, {Name: "RQLite Raft", Port: constants.RQLiteRaftPort}, }, "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. If a port is in use, it identifies the process and gives actionable guidance.
func GetProductionServices ¶
func GetProductionServices() []string
GetProductionServices returns a list of all DeBros production service names that exist, including both global services and namespace-specific services
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 ShowDryRunSummaryWithRelay ¶
func ShowDryRunSummaryWithRelay(vpsIP, domain, branch string, peers []string, joinAddress string, isFirstNode bool, oramaDir string, relayInfo *AnyoneRelayDryRunInfo)
ShowDryRunSummaryWithRelay displays what would be done during installation with optional relay info
func StartServicesOrdered ¶
StartServicesOrdered starts services respecting namespace dependency order. Namespace services are started in order: rqlite → olric (+ wait) → gateway. Non-namespace services are started after. The action parameter is the systemctl command (e.g., "start" or "restart").
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 AnyoneRelayDryRunInfo ¶
type AnyoneRelayDryRunInfo struct {
Enabled bool
Exit bool
Nickname string
Contact string
Wallet string
ORPort int
}
AnyoneRelayDryRunInfo contains Anyone relay info for dry-run summary
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.