Documentation
¶
Overview ¶
Package wsl owns installed WSL distribution discovery and independent Linux Host deployment into a WSL2 distribution for the execution Node.
Index ¶
- func ReleaseScript(version string, update bool, network *protocol.NetworkSelection) (string, error)
- type ConfigureNetwork
- type Installation
- type Service
- func (service *Service) Begin(ctx context.Context, caller protocol.NodeID, request protocol.Request) (*Installation, error)
- func (service *Service) Cancel(caller protocol.NodeID, request protocol.RequestID) error
- func (service *Service) List(ctx context.Context, environment []string) ([]protocol.WslDistribution, error)
- func (service *Service) Progress(caller protocol.NodeID, request protocol.RequestID) (protocol.SshInstallProgress, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReleaseScript ¶
ReleaseScript prefixes the official release bootstrap with its version, whether it updates an installed Host, and the network arguments forwarded to the Host installer. SSH Add Host runs the same script.
Types ¶
type ConfigureNetwork ¶
type ConfigureNetwork func(ctx context.Context, endpoint *link.Link, address link.EndpointAddress, request protocol.RequestID, selection protocol.NetworkSelection) error
ConfigureNetwork applies and confirms the selected network on a paired Host. It is the Host deployment's implementation shared with SSH.
type Installation ¶
type Installation struct {
// contains filtered or unexported fields
}
Installation is one registered installation. Close releases its registration.
func (*Installation) Close ¶
func (installation *Installation) Close()
func (*Installation) Execute ¶
func (installation *Installation) Execute(environment []string, endpoint *link.Link, local protocol.NodeID, network *protocol.NetworkSelection, configure ConfigureNetwork) (protocol.HostInstallationOutcome, error)
Execute installs the current Host release into the distribution and pairs it with the local endpoint. local is the controller's own Node identity.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service tracks active WSL Host installations for progress and cancellation.
func NewService ¶
func NewService() *Service
func (*Service) Begin ¶
func (service *Service) Begin(ctx context.Context, caller protocol.NodeID, request protocol.Request) (*Installation, error)
Begin registers an install_wsl_host request. The context bounds the whole installation; cancelling it or calling Cancel stops the active step.
func (*Service) Cancel ¶
Cancel stops the caller's own active installation. A request that is not active is already settled, so cancelling it succeeds without effect.