utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRealServer added in v1.1.0

func BuildRealServer(real string) *ipvs.RealServer

func BuildVirtualServer added in v1.1.0

func BuildVirtualServer(vip string) *ipvs.VirtualServer

func Contains added in v1.1.0

func Contains(sub, s string) (bool, error)

func IsHTTPAPIHealth added in v0.1.0

func IsHTTPAPIHealth(ip, port, path, schem string) bool

IsHTTPAPIHealth is check http error

func IsIPv6 added in v1.1.0

func IsIPv6(netIP net.IP) bool

IsIPv6 returns if netIP is IPv6.

func IsIpv4 added in v1.1.0

func IsIpv4(ip string) bool

func SplitServer

func SplitServer(server string) (string, uint16)

SplitServer is

Types

type LocalAddr added in v1.1.0

type LocalAddr struct {
	Addr      []net.Addr
	Interface net.Interface
}

func GetLocalDefaultRoute added in v1.1.0

func GetLocalDefaultRoute(ip string) (*LocalAddr, error)

func IsLocalHostAddrs added in v1.1.0

func IsLocalHostAddrs() ([]LocalAddr, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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