testing

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeNetsh

type FakeNetsh struct {
}

no-op implementation of netsh Interface

func NewFake

func NewFake() *FakeNetsh

func (*FakeNetsh) DeleteIPAddress

func (*FakeNetsh) DeleteIPAddress(args []string) error

DeleteIPAddress checks if the specified IP address is present and, if so, deletes it.

func (*FakeNetsh) DeletePortProxyRule

func (*FakeNetsh) DeletePortProxyRule(args []string) error

DeletePortProxyRule deletes the specified portproxy rule. If the rule did not exist, return error.

func (*FakeNetsh) EnsureIPAddress

func (*FakeNetsh) EnsureIPAddress(args []string, ip net.IP) (bool, error)

EnsureIPAddress checks if the specified IP Address is added to vEthernet (HNSTransparent) interface, if not, add it. If the address existed, return true.

func (*FakeNetsh) EnsurePortProxyRule

func (*FakeNetsh) EnsurePortProxyRule(args []string) (bool, error)

func (*FakeNetsh) GetInterfaceToAddIP

func (*FakeNetsh) GetInterfaceToAddIP() string

GetInterfaceToAddIP returns the interface name where Service IP needs to be added IP Address needs to be added for netsh portproxy to redirect traffic Reads Environment variable INTERFACE_TO_ADD_SERVICE_IP, if it is not defined then "vEthernet (HNSTransparent)" is returned

func (*FakeNetsh) Restore

func (*FakeNetsh) Restore(args []string) error

Restore runs `netsh exec` to restore portproxy or addresses using a file. TODO Check if this is required, most likely not

Jump to

Keyboard shortcuts

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