development

package
v0.61.0-nightly Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequiredPorts = []int{

	4001, 4002, 4003,

	4501, 4502, 4503,

	5001, 5002, 5003,

	7001, 7002, 7003,

	6001,

	3320, 3322,

	9050,

	9094, 9104, 9114,

	8080, 8081, 8082,
}

RequiredPorts defines all ports needed for dev environment

Functions

func PortMap

func PortMap() map[int]string

PortMap provides a human-readable mapping of ports to services

Types

type ConfigEnsurer

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

ConfigEnsurer handles all config file creation and validation

func NewConfigEnsurer

func NewConfigEnsurer(debrosDir 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

type HealthCheckResult struct {
	Name    string
	Healthy bool
	Details string
}

HealthCheckResult represents the result of a health check

type ManagedProcess

type ManagedProcess struct {
	Name      string
	PID       int
	StartTime time.Time
	LogPath   string
}

ManagedProcess tracks a running process

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(debrosDir 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

func (*ProcessManager) StopAll

func (pm *ProcessManager) StopAll(ctx context.Context) error

StopAll stops all running processes

Jump to

Keyboard shortcuts

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