Documentation ¶
Index ¶
- Constants
- func GetHost(uri string) (string, error)
- func GetHostname() string
- func Glob(subj, pattern string) bool
- func IsDomainURL(host, port string) (*url.URL, error)
- func LookupIP(host string) (string, error)
- func MustURL(host, port string) *url.URL
- func NewFuncReader(handler func([]byte), r io.Reader) io.Reader
- func NewFuncWriter(handler func(*[]byte), w io.Writer) io.Writer
- type Timer
- type TimerResult
Constants ¶
const GLOB = "*"
GLOB is the character which is treaded like a glob
Variables ¶
This section is empty.
Functions ¶
func GetHostname ¶
func GetHostname() string
GetHostname returns the servers hostname which we should compare against webserver vhost entries. Also includes domain.
func IsDomainURL ¶
IsDomainURL should validate the data we are obtaining from the webservers to ensure it is a proper hostname and/or port (within reason. custom configs are custom)
func NewFuncReader ¶
NewFuncReader returns an io.Reader that wraps the given io.Reader with the given handler. If any of the parameters are nil, nil is returned.
func NewFuncWriter ¶
NewFuncWriter returns an io.Writer that wraps the given io.Writer with the given handler. Any Write() operations will run through the handler before being written. If any of the parameters are nil, nil is returned.
Types ¶
type Timer ¶
type Timer struct { Result *TimerResult // contains filtered or unexported fields }
Timer represents a custom timer, holding start/end nanoseconds
type TimerResult ¶
TimerResult is a result of an ended timer, providing easy millisecond and second calculations to the process time