package netutil

import "github.com/coreos/etcd/pkg/netutil"

Package netutil implements network-related utility functions.

Index

Functions

func DropPort

func DropPort(port int) error

func GetDefaultHost

func GetDefaultHost() (string, error)

GetDefaultHost fetches the a resolvable name that corresponds to the machine's default routable interface

func GetDefaultInterfaces

func GetDefaultInterfaces() (map[string]uint8, error)

GetDefaultInterfaces fetches the device name of default routable interface.

func IsNetworkTimeoutError

func IsNetworkTimeoutError(err error) bool

func RecoverPort

func RecoverPort(port int) error

func RemoveLatency

func RemoveLatency() error

func SetLatency

func SetLatency(ms, rv int) error

func URLStringsEqual

func URLStringsEqual(ctx context.Context, a []string, b []string) (bool, error)

URLStringsEqual returns "true" if given URLs are valid and resolved to same IP addresses. Otherwise, return "false" and error, if any.

Source Files

isolate_stub.go netutil.go routes.go

Version
v3.3.19+incompatible
Published
Mar 19, 2020
Platform
js/wasm
Imports
10 packages
Last checked
1 hour ago

Tools for package owners.