Documentation
¶
Overview ¶
Package wsl owns installed WSL distribution discovery and independent Linux Host deployment into a WSL2 distribution for the execution Node.
Index ¶
- func PreflightScript(release identity.HostRelease) string
- func ReleaseScript(version string, update bool, network *protocol.NetworkSelection) (string, error)
- func ReleaseScriptFor(release identity.HostRelease, version string, update bool, ...) (string, error)
- func ResolveRelease(ctx context.Context, release identity.HostRelease) (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 PreflightScript ¶
func PreflightScript(release identity.HostRelease) string
func ReleaseScript ¶
func ReleaseScriptFor ¶
func ReleaseScriptFor(release identity.HostRelease, version string, update bool, network *protocol.NetworkSelection) (string, error)
ReleaseScriptFor selects the build-owned feed for the shared SSH and WSL bootstrap.
func ResolveRelease ¶
ResolveRelease selects a published Host tag before invoking the installer.
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 NewServiceForRelease ¶
func NewServiceForRelease(release identity.HostRelease) *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.