installer

package
v0.72.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package installer provides an interactive TUI installer for Orama Network

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveryResult

type DiscoveryResult struct {
	PeerID         string   // LibP2P peer ID
	IPFSPeerID     string   // IPFS peer ID
	IPFSSwarmAddrs []string // IPFS swarm addresses
	// IPFS Cluster info for cluster peer discovery
	IPFSClusterPeerID string   // IPFS Cluster peer ID
	IPFSClusterAddrs  []string // IPFS Cluster multiaddresses
}

DiscoveryResult contains all information discovered from a peer node

type InstallerConfig

type InstallerConfig struct {
	VpsIP          string
	Domain         string
	PeerDomain     string   // Domain of existing node to join
	PeerIP         string   // Resolved IP of peer domain (for Raft join)
	JoinAddress    string   // Auto-populated: {PeerIP}:7002 (direct RQLite TLS)
	Peers          []string // Auto-populated: /dns4/{PeerDomain}/tcp/4001/p2p/{PeerID}
	ClusterSecret  string
	SwarmKeyHex    string   // 64-hex IPFS swarm key (for joining private network)
	IPFSPeerID     string   // IPFS peer ID (auto-discovered from peer domain)
	IPFSSwarmAddrs []string // IPFS swarm addresses (auto-discovered from peer domain)
	// IPFS Cluster peer info for cluster discovery
	IPFSClusterPeerID string   // IPFS Cluster peer ID (auto-discovered from peer domain)
	IPFSClusterAddrs  []string // IPFS Cluster addresses (auto-discovered from peer domain)
	Branch            string
	IsFirstNode       bool
	NoPull            bool
}

InstallerConfig holds the configuration gathered from the TUI

func Run

func Run() (*InstallerConfig, error)

Run starts the TUI installer and returns the configuration

type Model

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

Model is the bubbletea model for the installer

func NewModel

func NewModel() Model

NewModel creates a new installer model

func (Model) GetConfig

func (m Model) GetConfig() InstallerConfig

GetConfig returns the installer configuration after the TUI completes

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages

func (Model) View

func (m Model) View() string

View renders the UI

type Step

type Step int

Step represents a step in the installation wizard

const (
	StepWelcome Step = iota
	StepNodeType
	StepVpsIP
	StepDomain
	StepPeerDomain // Domain of existing node to join (replaces StepJoinAddress)
	StepClusterSecret
	StepSwarmKey // 64-hex swarm key for IPFS private network
	StepBranch
	StepNoPull
	StepConfirm
	StepInstalling
	StepDone
)

Jump to

Keyboard shortcuts

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