Documentation
¶
Index ¶
- Variables
- func PortMap() map[int]string
- type ConfigEnsurer
- type Dependency
- type DependencyChecker
- type HealthCheckResult
- type ManagedProcess
- type NodeSpec
- type PortChecker
- type ProcessManager
- func (pm *ProcessManager) HealthCheckWithRetry(ctx context.Context, nodes []ipfsNodeInfo, retries int, ...) bool
- func (pm *ProcessManager) IPFSHealthCheck(ctx context.Context, nodes []ipfsNodeInfo) HealthCheckResult
- func (pm *ProcessManager) LibP2PHealthCheck(ctx context.Context) HealthCheckResult
- func (pm *ProcessManager) RQLiteHealthCheck(ctx context.Context) HealthCheckResult
- func (pm *ProcessManager) StartAll(ctx context.Context) error
- func (pm *ProcessManager) Status(ctx context.Context)
- func (pm *ProcessManager) StopAll(ctx context.Context) error
- type Topology
Constants ¶
This section is empty.
Variables ¶
var RequiredPorts = DefaultTopology().AllPorts()
RequiredPorts defines all ports needed for dev environment Computed from DefaultTopology
Functions ¶
Types ¶
type ConfigEnsurer ¶
type ConfigEnsurer struct {
// contains filtered or unexported fields
}
ConfigEnsurer handles all config file creation and validation
func NewConfigEnsurer ¶
func NewConfigEnsurer(oramaDir string) *ConfigEnsurer
NewConfigEnsurer creates a new config ensurer
func (*ConfigEnsurer) EnsureAll ¶
func (ce *ConfigEnsurer) EnsureAll() error
EnsureAll ensures all necessary config files and secrets exist
type Dependency ¶
type Dependency struct {
Name string
Command string
MinVersion string // Optional: if set, try to check version
InstallHint string
}
Dependency represents an external binary dependency
type DependencyChecker ¶
type DependencyChecker struct {
// contains filtered or unexported fields
}
DependencyChecker handles dependency validation
func NewDependencyChecker ¶
func NewDependencyChecker() *DependencyChecker
NewDependencyChecker creates a new dependency checker
func (*DependencyChecker) CheckAll ¶
func (dc *DependencyChecker) CheckAll() ([]string, error)
CheckAll performs all dependency checks and returns a report
type HealthCheckResult ¶
HealthCheckResult represents the result of a health check
type ManagedProcess ¶
ManagedProcess tracks a running process
type NodeSpec ¶
type NodeSpec struct {
Name string // node-1, node-2, node-3, node-4, node-5
ConfigFilename string // node-1.yaml, node-2.yaml, etc.
DataDir string // relative path from .orama root
P2PPort int // LibP2P listen port
IPFSAPIPort int // IPFS API port
IPFSSwarmPort int // IPFS Swarm port
IPFSGatewayPort int // IPFS HTTP Gateway port
RQLiteHTTPPort int // RQLite HTTP API port
RQLiteRaftPort int // RQLite Raft consensus port
ClusterAPIPort int // IPFS Cluster REST API port
ClusterPort int // IPFS Cluster P2P port
UnifiedGatewayPort int // Unified gateway port (proxies all services)
RQLiteJoinTarget string // which node's RQLite Raft port to join (empty for first node)
ClusterJoinTarget string // which node's cluster to join (empty for first node)
}
NodeSpec defines configuration for a single dev environment node
type PortChecker ¶
type PortChecker struct {
// contains filtered or unexported fields
}
PortChecker validates that required ports are available
func NewPortChecker ¶
func NewPortChecker() *PortChecker
NewPortChecker creates a new port checker with required ports
func (*PortChecker) CheckAll ¶
func (pc *PortChecker) CheckAll() ([]int, error)
CheckAll verifies all required ports are available
type ProcessManager ¶
type ProcessManager struct {
// contains filtered or unexported fields
}
ProcessManager manages all dev environment processes
func NewProcessManager ¶
func NewProcessManager(oramaDir string, logWriter io.Writer) *ProcessManager
NewProcessManager creates a new process manager
func (*ProcessManager) HealthCheckWithRetry ¶
func (pm *ProcessManager) HealthCheckWithRetry(ctx context.Context, nodes []ipfsNodeInfo, retries int, retryInterval time.Duration, timeout time.Duration) bool
HealthCheckWithRetry performs a health check with retry logic
func (*ProcessManager) IPFSHealthCheck ¶
func (pm *ProcessManager) IPFSHealthCheck(ctx context.Context, nodes []ipfsNodeInfo) HealthCheckResult
IPFSHealthCheck verifies IPFS peer connectivity
func (*ProcessManager) LibP2PHealthCheck ¶
func (pm *ProcessManager) LibP2PHealthCheck(ctx context.Context) HealthCheckResult
LibP2PHealthCheck verifies that network nodes have peer connections
func (*ProcessManager) RQLiteHealthCheck ¶
func (pm *ProcessManager) RQLiteHealthCheck(ctx context.Context) HealthCheckResult
RQLiteHealthCheck verifies RQLite cluster formation
func (*ProcessManager) StartAll ¶
func (pm *ProcessManager) StartAll(ctx context.Context) error
StartAll starts all development services
func (*ProcessManager) Status ¶
func (pm *ProcessManager) Status(ctx context.Context)
Status reports the status of all services
type Topology ¶
type Topology struct {
Nodes []NodeSpec
GatewayPort int
OlricHTTPPort int
OlricMemberPort int
AnonSOCKSPort int
}
Topology defines the complete development environment topology
func DefaultTopology ¶
func DefaultTopology() *Topology
DefaultTopology returns the default five-node dev environment topology
func (*Topology) GetFirstNode ¶ added in v0.72.0
GetFirstNode returns the first node (the one that creates the cluster)
func (*Topology) GetJoiningNodes ¶ added in v0.72.0
GetJoiningNodes returns all nodes except the first one (they join the cluster)
func (*Topology) GetNodeByName ¶
GetNodeByName returns a node by its name, or nil if not found