networkutils

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPortValid added in v0.7.0

func IsPortValid(port string) bool

Types

type DefaultNetClient

type DefaultNetClient struct{}

func (*DefaultNetClient) DialTimeout

func (n *DefaultNetClient) DialTimeout(network, address string, timeout time.Duration) (net.Conn, error)

type IPGenerator

type IPGenerator interface {
	GenerateUniqueIP(cidrBlock string) (string, error)
	IsIPUnique(ip string) bool
}

func NewIPGenerator

func NewIPGenerator(netClient NetClient) IPGenerator

type NetClient

type NetClient interface {
	DialTimeout(network, address string, timeout time.Duration) (net.Conn, error)
}

Jump to

Keyboard shortcuts

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