Documentation ¶
Overview ¶
Package wsl implements wrapper functions the Windwos Subsystem For Linux API as documented in https://docs.microsoft.com/en-us/previous-versions/windows/desktop/api/_wsl/
Index ¶
- func ConfigureDistribution(name string, defaultUID uint32, flags DistributionFlags) error
- func IsDistributionRegistered(name string) bool
- func Launch(name string, command string, useCwd bool, stdin, stdout, stderr windows.Handle) (process windows.Handle, err error)
- func LaunchInteractive(name string, command string, useCwd bool) (exitCode uint32, err error)
- func RegisterDistribution(name string, tarball string) (err error)
- func UnregisterDistribution(name string, tarball string) (err error)
- type DistributionFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureDistribution ¶
func ConfigureDistribution(name string, defaultUID uint32, flags DistributionFlags) error
ConfigureDistribution Modifies the behavior of a distribution registered with the Windows Subsystem for Linux.
func IsDistributionRegistered ¶
IsDistributionRegistered determines if a distribution is registered with the Windows Subsystem for Linux.
func Launch ¶
func Launch(name string, command string, useCwd bool, stdin, stdout, stderr windows.Handle) (process windows.Handle, err error)
Launch launches a Windows Subsystem for Linux (WSL) process in the context of a particular distribution.
See https://docs.microsoft.com/en-us/previous-versions/windows/desktop/api/wslapi/nf-wslapi-wsllaunch
func LaunchInteractive ¶
LaunchInteractive Launches an interactive Windows Subsystem for Linux (WSL) process in the context of a particular distribution. This differs from Launch in that the end user will be able to interact with the newly-created process.
func RegisterDistribution ¶
RegisterDistribution registers a new distribution with the Windows Subsystem for Linux.
func UnregisterDistribution ¶
UnregisterDistribution unregisters a distribution from the Windows Subsystem for Linux.
Types ¶
type DistributionFlags ¶
type DistributionFlags uint32
const ( DISTRIBUTION_FLAGS_NONE DistributionFlags = iota DISTRIBUTION_FLAGS_ENABLE_INTEROP DISTRIBUTION_FLAGS_APPEND_NT_PATH DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING )
func GetDistributionConfiguration ¶
func GetDistributionConfiguration(name string) (version uint32, defaultUID uint32, flags DistributionFlags, environment []string, err error)
GetDistributionConfiguration retrieves the current configuration of a distribution registered with the Windows Subsystem for Linux.