netutil

package
v0.0.0-...-bec1903 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2014 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package netutil contains network-related utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullyQualifiedHostname

func FullyQualifiedHostname() (string, error)

FullyQualifiedHostname returns the full hostname with domain

func FullyQualifiedHostnameOrPanic

func FullyQualifiedHostnameOrPanic() string

FullyQualifiedHostnameOrPanic is the same as FullyQualifiedHostname but panics in case of error

func ResolveAddr

func ResolveAddr(addr string) (string, error)

ResolveAddr can resolve an address where the host has been left blank, like ":3306"

func ResolveIPv4Addr

func ResolveIPv4Addr(addr string) (string, error)

ResolveIpAddr resolves the address:port part into an IP address:port pair

func ResolveIpAddr

func ResolveIpAddr(addr string) (string, error)

ResolveIpAddr resolves the address:port part into an IP address:port pair

func SortRfc2782

func SortRfc2782(srvs []*net.SRV)

SortRfc2782 reorders SRV records as specified in RFC 2782.

func SplitHostPort

func SplitHostPort(addr string) (string, int, error)

SplitHostPort is an extension to net.SplitHostPort that also parses the integer port

Types

This section is empty.

Jump to

Keyboard shortcuts

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