hostresources

package
v0.0.0-...-7630055 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UUID []byte

Functions

func GenerateUuid

func GenerateUuid() string

GenerateUuid returns an unique id

func GetFileSHA256

func GetFileSHA256(filename string) string

func GetIPOfInt

func GetIPOfInt(ifname string) net.IP

GetIPOfInt will iterate over all addresses for the given network interface, but will return only the first one it finds. TODO(mierdin): This has obvious drawbacks, particularly with IPv6. Need to figure out a better way.

func IsShortID

func IsShortID(id string) bool

Determine if an arbitrary string *looks like* a short ID.

func TruncateID

func TruncateID(id string) string

TruncateID returns a shorthand version of a string identifier for convenience. A collision with other shorthands is very unlikely, but possible. In case of a collision a lookup with TruncIndex.Get() will fail, and the caller will need to use a langer prefix, or the full-length Id.

Types

This section is empty.

Jump to

Keyboard shortcuts

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