wsl

package module
v0.0.0-...-33e113d Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2018 License: AGPL-3.0 Imports: 3 Imported by: 0

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

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.

See https://docs.microsoft.com/en-us/previous-versions/windows/desktop/api/wslapi/nf-wslapi-wslconfiguredistribution

func IsDistributionRegistered

func IsDistributionRegistered(name string) bool

IsDistributionRegistered determines if a distribution is registered with the Windows Subsystem for Linux.

See https://docs.microsoft.com/en-us/previous-versions/windows/desktop/api/wslapi/nf-wslapi-wslisdistributionregistered

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

func LaunchInteractive(name string, command string, useCwd bool) (exitCode uint32, err error)

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.

See https://docs.microsoft.com/en-us/previous-versions/windows/desktop/api/wslapi/nf-wslapi-wsllaunchinteractive

func RegisterDistribution

func RegisterDistribution(name string, tarball string) (err error)

RegisterDistribution registers a new distribution with the Windows Subsystem for Linux.

See https://docs.microsoft.com/en-us/previous-versions/windows/desktop/api/wslapi/nf-wslapi-wslregisterdistribution

func UnregisterDistribution

func UnregisterDistribution(name string, tarball string) (err error)

UnregisterDistribution unregisters a distribution from the Windows Subsystem for Linux.

See https://docs.microsoft.com/en-us/previous-versions/windows/desktop/api/wslapi/nf-wslapi-wslunregisterdistribution

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.

See https://docs.microsoft.com/en-us/previous-versions/windows/desktop/api/wslapi/nf-wslapi-wslgetdistributionconfiguration

Jump to

Keyboard shortcuts

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