util

package
v1.6.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ArpaSuffix is the standard suffix for PTR IP reverse lookups.
	ArpaSuffix = ".in-addr.arpa."
)

Variables

This section is empty.

Functions

func ExtractIP

func ExtractIP(reverseName string) (string, bool)

extractIP turns a standard PTR reverse record lookup name into an IP address

func GetSkyMsg

func GetSkyMsg(ip string, port int) (*msg.Service, string)

Returns record in a format that SkyDNS understands. Also return the hash of the record.

func HashServiceRecord

func HashServiceRecord(msg *msg.Service) string

HashServiceRecord hashes the string representation of a DNS message.

func NewServiceRecord

func NewServiceRecord(ip string, port int) *msg.Service

NewServiceRecord creates a new service DNS message.

func ReverseArray

func ReverseArray(arr []string) []string

ReverseArray reverses an array.

Types

This section is empty.

Jump to

Keyboard shortcuts

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