network

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(ctx context.Context, hostname string, opts networkutils.Opts) error

func ResolveHostnames

func ResolveHostnames(ctx context.Context, ipOrHostnames ...string) ([]string, error)

func Revert

func Revert(ctx context.Context, hostname string, opts networkutils.Opts) error

Types

type Interface

type Interface struct {
	Index    uint     `json:"ifindex"`
	Name     string   `json:"ifname"`
	LinkType string   `json:"link_type"`
	Flags    []string `json:"flags"`
}

func ListInterfaces

func ListInterfaces(ctx context.Context) ([]Interface, error)

func (*Interface) HasFlag

func (i *Interface) HasFlag(f string) bool

Jump to

Keyboard shortcuts

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