Documentation
¶
Index ¶
- Variables
- type MultiError
- type NetworkManagerImpl
- func (m *NetworkManagerImpl) CreateNetwork(ctx context.Context, devnetName string) (string, string, error)
- func (m *NetworkManagerImpl) DeleteNetwork(ctx context.Context, networkID string) error
- func (m *NetworkManagerImpl) GetNetworkSubnet(ctx context.Context, networkID string) (string, error)
- func (m *NetworkManagerImpl) ListDevnetNetworks(ctx context.Context) ([]ports.NetworkInfo, error)
- func (m *NetworkManagerImpl) NetworkExists(ctx context.Context, networkID string) (bool, error)
- type OrchestratorImpl
- func (o *OrchestratorImpl) Deploy(ctx context.Context, config *ports.DeploymentConfig) (*ports.DeploymentResult, error)
- func (o *OrchestratorImpl) GetState(ctx context.Context, devnetName string) (*ports.DeploymentState, error)
- func (o *OrchestratorImpl) Rollback(ctx context.Context, state *ports.DeploymentState) error
- type PortAllocatorImpl
- func (p *PortAllocatorImpl) AllocateRange(ctx context.Context, devnetName string, validatorCount int) (*ports.PortAllocation, error)
- func (p *PortAllocatorImpl) GetAllocation(ctx context.Context, devnetName string) (*ports.PortAllocation, error)
- func (p *PortAllocatorImpl) ListAllocations(ctx context.Context) ([]*ports.PortAllocation, error)
- func (p *PortAllocatorImpl) ReleaseRange(ctx context.Context, devnetName string) error
- func (p *PortAllocatorImpl) ValidatePortAvailability(ctx context.Context, allocation *ports.PortAllocation) ([]int, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrValidationFailed = errors.New("deployment configuration validation failed") ErrPortAllocationFailed = errors.New("failed to allocate port range") ErrPortConflictDetected = errors.New("allocated ports conflict with host services") ErrImagePullFailed = errors.New("failed to pull Docker image") ErrCustomBuildFailed = errors.New("failed to build custom Docker image") ErrContainerStartFailed = errors.New("failed to start container") ErrHealthCheckTimeout = errors.New("container health check timeout") ErrPartialDeployment = errors.New("partial deployment (some containers failed)") ErrOrchestratorRollbackFailed = errors.New("rollback encountered errors") )
Orchestrator errors
var ( ErrInvalidDevnetName = errors.New("devnet name contains invalid characters") ErrNoAvailableSubnets = errors.New("no available subnets in 172.x.0.0/16 range") ErrNetworkCreationFailed = errors.New("docker network create command failed") ErrNetworkNotFound = errors.New("docker network not found") ErrNetworkHasContainers = errors.New("network has attached containers, cannot delete") ErrNetworkDeletionFailed = errors.New("docker network rm command failed") )
NetworkManager errors
Functions ¶
This section is empty.
Types ¶
type MultiError ¶
type MultiError struct {
Errors []error
}
MultiError represents multiple errors
func (*MultiError) Error ¶
func (m *MultiError) Error() string
type NetworkManagerImpl ¶
type NetworkManagerImpl struct{}
NetworkManagerImpl implements the NetworkManager interface
func NewNetworkManager ¶
func NewNetworkManager() *NetworkManagerImpl
NewNetworkManager creates a new network manager
func (*NetworkManagerImpl) CreateNetwork ¶
func (m *NetworkManagerImpl) CreateNetwork(ctx context.Context, devnetName string) (string, string, error)
CreateNetwork creates an isolated bridge network for a devnet
func (*NetworkManagerImpl) DeleteNetwork ¶
func (m *NetworkManagerImpl) DeleteNetwork(ctx context.Context, networkID string) error
DeleteNetwork removes a Docker network
func (*NetworkManagerImpl) GetNetworkSubnet ¶
func (m *NetworkManagerImpl) GetNetworkSubnet(ctx context.Context, networkID string) (string, error)
GetNetworkSubnet retrieves the subnet CIDR for a network
func (*NetworkManagerImpl) ListDevnetNetworks ¶
func (m *NetworkManagerImpl) ListDevnetNetworks(ctx context.Context) ([]ports.NetworkInfo, error)
ListDevnetNetworks returns all networks created by devnet-builder
func (*NetworkManagerImpl) NetworkExists ¶
NetworkExists checks if a network with given ID exists
type OrchestratorImpl ¶
type OrchestratorImpl struct {
// contains filtered or unexported fields
}
OrchestratorImpl implements the DeploymentOrchestrator interface
func NewOrchestrator ¶
func NewOrchestrator( networkManager ports.NetworkManager, portAllocator ports.PortAllocator, dockerManager *node.DockerManager, logger *output.Logger, ) *OrchestratorImpl
NewOrchestrator creates a new deployment orchestrator
func (*OrchestratorImpl) Deploy ¶
func (o *OrchestratorImpl) Deploy(ctx context.Context, config *ports.DeploymentConfig) (*ports.DeploymentResult, error)
Deploy orchestrates complete devnet deployment
func (*OrchestratorImpl) GetState ¶
func (o *OrchestratorImpl) GetState(ctx context.Context, devnetName string) (*ports.DeploymentState, error)
GetState retrieves current deployment state for a devnet
func (*OrchestratorImpl) Rollback ¶
func (o *OrchestratorImpl) Rollback(ctx context.Context, state *ports.DeploymentState) error
Rollback manually triggers rollback of a deployment
type PortAllocatorImpl ¶
type PortAllocatorImpl struct {
// contains filtered or unexported fields
}
PortAllocatorImpl implements the PortAllocator interface
func NewPortAllocator ¶
func NewPortAllocator(homeDir string) *PortAllocatorImpl
NewPortAllocator creates a new port allocator
func (*PortAllocatorImpl) AllocateRange ¶
func (p *PortAllocatorImpl) AllocateRange(ctx context.Context, devnetName string, validatorCount int) (*ports.PortAllocation, error)
AllocateRange reserves a contiguous port range for a devnet
func (*PortAllocatorImpl) GetAllocation ¶
func (p *PortAllocatorImpl) GetAllocation(ctx context.Context, devnetName string) (*ports.PortAllocation, error)
GetAllocation retrieves allocation details for a devnet
func (*PortAllocatorImpl) ListAllocations ¶
func (p *PortAllocatorImpl) ListAllocations(ctx context.Context) ([]*ports.PortAllocation, error)
ListAllocations returns all active port allocations
func (*PortAllocatorImpl) ReleaseRange ¶
func (p *PortAllocatorImpl) ReleaseRange(ctx context.Context, devnetName string) error
ReleaseRange frees a previously allocated port range
func (*PortAllocatorImpl) ValidatePortAvailability ¶
func (p *PortAllocatorImpl) ValidatePortAvailability(ctx context.Context, allocation *ports.PortAllocation) ([]int, error)
ValidatePortAvailability checks if allocated ports conflict with host services