Documentation ¶
Overview ¶
from aws-sdk-go
- export ETCDCTL_API=3
- etcdctl get --prefix /openfalcon
Index ¶
- Constants
- Variables
- func AddrIsDisable(addr string) bool
- func Atob(str string, def ...bool) bool
- func Atoi(str string, def ...int) int
- func Atoi64(str string, def ...int) int64
- func Backtraces()
- func Base64Decode(in string) ([]byte, error)
- func Base64Encode(in []byte) string
- func Bash(script []byte) ([]byte, error)
- func Bool(v bool) *bool
- func BoolMap(src map[string]bool) map[string]*bool
- func BoolSlice(src []bool) []*bool
- func BoolValue(v *bool) bool
- func BoolValueMap(src map[string]*bool) map[string]bool
- func BoolValueSlice(src []*bool) []bool
- func Byte(v byte) *byte
- func ByteValue(v *byte) byte
- func Caller(n int) string
- func CamelCasedName(in string) string
- func CheckCmds(cmds ...string) error
- func CheckDir(dir string, mk bool) error
- func CheckDirName(name string) error
- func CheckDirs(dirs ...string) error
- func CheckGroupName(name string) error
- func CheckName(name string) error
- func CheckPath(name string) error
- func CheckRoleName(name string) error
- func CheckScopeName(name string) error
- func CleanSockFile(net, addr string) (string, string)
- func Dialer(addr string, timeout time.Duration) (net.Conn, error)
- func Diff(src, dst []string) (add, del []string)
- func Diff2Map(pre, now interface{}) map[string]interface{}
- func Diff3(src, dst []string) (add, del, eq []string)
- func EnvDef(key, defaultValue string) string
- func EnvVarFilter(data []byte) []byte
- func Error(err error) string
- func ErrorString(err error) *string
- func Errorf(format string, args ...interface{}) error
- func Exec(name string, arg ...string) error
- func FileMd5sum(file string) (string, error)
- func Filepath(name string) (string, error)
- func FirstLine(in string) string
- func Float32(v float32) *float32
- func Float32Value(v *float32) float32
- func Float64(v float64) *float64
- func Float64Map(src map[string]float64) map[string]*float64
- func Float64Slice(src []float64) []*float64
- func Float64Value(v *float64) float64
- func Float64ValueMap(src map[string]*float64) map[string]float64
- func Float64ValueSlice(src []*float64) []float64
- func FmtTs(ts int64, verbose ...bool) string
- func FromNow(s int64) string
- func FromNowAbs(s int64) string
- func GetArticleForNoun(noun string, padding string) string
- func GetIPAddress(r *http.Request) string
- func GetName(v interface{}) string
- func GetPeerAddrFromCtx(ctx context.Context) (string, error)
- func GetRemoteIP(remoteAddr string) (net.IP, error)
- func GetType(v interface{}) string
- func GetUGroups(username string) ([]uint32, error)
- func GetValue(rv reflect.Value) (data []string, err error)
- func IPContains(ip net.IP, network string) bool
- func IndentLines(i int, lines string) (ret string)
- func Int(v int) *int
- func Int16(v int16) *int16
- func Int16Value(v *int16) int16
- func Int32(v int32) *int32
- func Int32Value(v *int32) int32
- func Int64(v int64) *int64
- func Int64Map(src map[string]int64) map[string]*int64
- func Int64Slice(src []int64) []*int64
- func Int64Value(v *int64) int64
- func Int64ValueMap(src map[string]*int64) map[string]int64
- func Int64ValueSlice(src []*int64) []int64
- func Int8(v int8) *int8
- func Int8Value(v *int8) int8
- func IntMap(src map[string]int) map[string]*int
- func IntRange(a, b, c int) int
- func IntSlice(src []int) []*int
- func IntValue(v *int) int
- func IntValueMap(src map[string]*int) map[string]int
- func IntValueSlice(src []*int) []int
- func IsDir(file string) bool
- func IsEmptyValue(v reflect.Value) bool
- func IsFile(file string) bool
- func JsonStr(in interface{}, pretty ...bool) string
- func JsonTab(in interface{}, minwidth, tabwidth, padding int, padchar byte, flags uint) ([]byte, error)
- func JsonTabStr(in interface{}, minwidth, tabwidth, padding int, padchar byte, flags uint) (string, error)
- func Kill(pid int, sig syscall.Signal) (err error)
- func KvMask(s string) string
- func LastLine(in string) string
- func LowerCamelCasedName(in string) string
- func MakeSlice(v interface{}) interface{}
- func Md5sum(raw []byte) string
- func MergeMapString(in ...map[string]string) map[string]string
- func MillisecondsTimeValue(v *int64) time.Time
- func MustJsonTabStr(in interface{}, minwidth, tabwidth, padding int, padchar byte, flags uint) string
- func NewStructPtr(in interface{}) interface{}
- func Now() int64
- func NowPtr(delta ...int64) *int64
- func ParseAddr(url string) (net, addr string)
- func ParseDate(value *string, hour, min, sec int) (*int64, error)
- func Popen(timeout time.Duration, dryRun bool, cmd string, args ...string) (string, error)
- func PrepareValue(rv reflect.Value, rt reflect.Type)
- func Prettify(i interface{}) string
- func PrettyTab(in string) string
- func Printable(in interface{}) bool
- func RandInt() int
- func RandInt64() int64
- func RandString(n int) string
- func ReadFile(url string) ([]byte, error)
- func ReadFileInt(filename string) (int, error)
- func ReadFileTo64(url string) (*string, error)
- func SecondsTimeValue(v *int64) time.Time
- func SetContentType(header http.Header, contentType string) error
- func SetValue(rv reflect.Value, data []string) error
- func Sha1sum(raw []byte) string
- func SizeOf(v string) uint64
- func SizeReadable(b int) string
- func SnakeCasedName(name string) string
- func Split(s string, c string, cutc bool) (string, string)
- func SrcAddr(addr net.IPAddr) net.IP
- func SrcAddrV4(a, b, c, d byte) net.IP
- func SrcAddrs(addrs []net.IPAddr) []net.IP
- func String(v string) *string
- func StringArrayContains(needle string, haystack []string) bool
- func StringMap(src map[string]string) map[string]*string
- func StringSlice(src []string) []*string
- func StringValue(v *string) string
- func StringValueMap(src map[string]*string) map[string]string
- func StringValueSlice(src []*string) []string
- func Strings2MapBool(ss []string) map[string]bool
- func Strings2MapString(ss []string, in ...map[string]string) map[string]string
- func StructConv(in, out interface{}) interface{}
- func StructCopy(dst, src interface{}) error
- func StructMd5(in interface{}) (string, error)
- func SubStr(in string, begin, end int) string
- func SubStr2(in string, begin, end int) string
- func SubStr3(in string, pre, suf int) string
- func Sum32(raw []byte) uint32
- func Sum64(raw []byte) uint64
- func Table(in interface{}) []byte
- func TableStr(in interface{}) string
- func Time(v time.Time) *time.Time
- func TimeMap(src map[string]time.Time) map[string]*time.Time
- func TimeOf(v string) int64
- func TimeSlice(src []time.Time) []*time.Time
- func TimeUnixMilli(t time.Time) int64
- func TimeValue(v *time.Time) time.Time
- func TimeValueMap(src map[string]*time.Time) map[string]time.Time
- func TimeValueSlice(src []*time.Time) []time.Time
- func TitleCasedName(name string, lower bool) string
- func ToScope(scope *string) (ret map[string]bool)
- func ToScopeStr(scope map[string]bool) *string
- func Uint(v uint) *uint
- func Uint16(v uint16) *uint16
- func Uint16Value(v *uint16) uint16
- func Uint32(v uint32) *uint32
- func Uint32Value(v *uint32) uint32
- func Uint64(v uint64) *uint64
- func Uint64Value(v *uint64) uint64
- func Uint8(v uint8) *uint8
- func Uint8Value(v *uint8) uint8
- func UintValue(v *uint) uint
- func Until(f func(), interval time.Duration, stopCh <-chan struct{})
- func UntilWithTick(f func(), c <-chan time.Time, stopCh <-chan struct{})
- func Username() string
- func Write(w io.Writer, b []byte) error
- func WriteTempFile(dir, pattern string, content []byte) (string, error)
- func YamlStr(in interface{}) string
- type ByteSize
- func (b ByteSize) Bytes() uint64
- func (b ByteSize) EBytes() float64
- func (b ByteSize) GBytes() float64
- func (b ByteSize) HR() string
- func (b ByteSize) HumanReadable() string
- func (b ByteSize) KBytes() float64
- func (b ByteSize) MBytes() float64
- func (b ByteSize) PBytes() float64
- func (b ByteSize) String() string
- func (b ByteSize) TBytes() float64
- type Cmd
- type DiffEntity
- type Duration
- type Parser
- type Preparer
Constants ¶
const ( B ByteSize = 1 KB = B << 10 MB = KB << 10 GB = MB << 10 TB = GB << 10 PB = TB << 10 EB = PB << 10 )
const ( TIME_F_SIMPLE = "2006-01-02 15:04:05" TIME_F_STD = "2006-01-02 15:04:05 -07" DATE_F_STD = "2006-01-02" TIME_M = int64(60) TIME_H = int64(60 * 60) TIME_D = int64(60 * 60 * 24) )
const (
IndentSize = 4
)
const (
NotAvailable = "-"
)
Variables ¶
var ( IpExp = regexp.MustCompile(`^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+`) AddrExp = regexp.MustCompile(`^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)?:[0-9]+`) NumExp = regexp.MustCompile(`^0x[0-9a-fA-F]+|^[0-9]+`) KeywordExp = regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9-_]+`) TextExp = regexp.MustCompile(`(^"[^"]+")|(^[^"\n \t;]+)`) EnvExp = regexp.MustCompile(`\$\{[a-zA-Z][0-9a-zA-Z_]+\}`) NameExp = regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9-_\.]*$`) NameExp2 = regexp.MustCompile(`^[a-z][a-z0-9-]*$`) NameExp3 = regexp.MustCompile(`^[a-z][a-z0-9:]*$`) PathExp = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9-_\.]*(\/[a-zA-Z0-9_][a-zA-Z0-9-_\.]*)*$`) )
var (
ErrDryRun = errors.New("dry run")
)
var (
ErrUnsupported = errors.New("Unsupported")
)
Functions ¶
func AddrIsDisable ¶
func Backtraces ¶
func Backtraces()
func Base64Decode ¶
func Base64Encode ¶
func BoolValue ¶
BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.
func BoolValueMap ¶
BoolValueMap converts a string map of bool pointers into a string map of bool values
func BoolValueSlice ¶
BoolValueSlice converts a slice of bool pointers into a slice of bool values
func CamelCasedName ¶
convert like this: "hello_world" to "HelloWorld"
func CheckDirName ¶
func CheckGroupName ¶
func CheckRoleName ¶
func CheckScopeName ¶
func CleanSockFile ¶
func EnvVarFilter ¶
Environment Variables $HOME value instead of ${HOME}
func ErrorString ¶
func FileMd5sum ¶
func Float32Value ¶ added in v0.0.2
func Float64Map ¶
Float64Map converts a string map of float64 values into a string map of float64 pointers
func Float64Slice ¶
Float64Slice converts a slice of float64 values into a slice of float64 pointers
func Float64Value ¶
Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.
func Float64ValueMap ¶
Float64ValueMap converts a string map of float64 pointers into a string map of float64 values
func Float64ValueSlice ¶
Float64ValueSlice converts a slice of float64 pointers into a slice of float64 values
func FromNowAbs ¶
func GetArticleForNoun ¶
GetArticleForNoun returns the article needed for the given noun.
func GetIPAddress ¶
GetIPAddress "X-Forwarded-For", "X-Real-Ip", req.RemoteAddr
func GetPeerAddrFromCtx ¶
GetPeerAddrFromCtx try to return peer address from grpc context
func GetRemoteIP ¶
GetRemoteIp host:port "192.0.2.1:25", "[2001:db8::1]:80"
func GetUGroups ¶
func IndentLines ¶
func Int16Value ¶ added in v0.0.2
func Int32Value ¶ added in v0.0.2
func Int64Slice ¶
Int64Slice converts a slice of int64 values into a slice of int64 pointers
func Int64Value ¶
func Int64ValueMap ¶
Int64ValueMap converts a string map of int64 pointers into a string map of int64 values
func Int64ValueSlice ¶
Int64ValueSlice converts a slice of int64 pointers into a slice of int64 values
func IntValueMap ¶
IntValueMap converts a string map of int pointers into a string map of int values
func IntValueSlice ¶
IntValueSlice converts a slice of int pointers into a slice of int values
func IsEmptyValue ¶
func JsonTab ¶
func JsonTab(in interface{}, minwidth, tabwidth, padding int, padchar byte, flags uint) ([]byte, error)
JsonTabStr(f, 0, 0, 2, ' ', tabwriter.TabIndent)
func JsonTabStr ¶
func LowerCamelCasedName ¶
convert like this: "hello_world" to "helloWorld"
func MillisecondsTimeValue ¶
MillisecondsTimeValue converts an int64 pointer to a time.Time value representing milliseconds sinch Epoch or time.Time{} if the pointer is nil.
func MustJsonTabStr ¶
func NewStructPtr ¶
func NewStructPtr(in interface{}) interface{}
func Prettify ¶
func Prettify(i interface{}) string
Prettify returns the string representation of a value.
func RandString ¶
func ReadFileInt ¶
func ReadFileTo64 ¶
func SecondsTimeValue ¶
SecondsTimeValue converts an int64 pointer to a time.Time value representing seconds since Epoch or time.Time{} if the pointer is nil.
func SizeReadable ¶
func SnakeCasedName ¶
func Split ¶
Maybe s is of the form t c u. If so, return t, c u (or t, u if cutc == true). If not, return s, "".
func SrcAddrs ¶
srcsAddrs tries to UDP-connect to each address to see if it has a route. (This doesn't send any packets). The destination port number is irrelevant.
func StringArrayContains ¶
func StringMap ¶
StringMap converts a string map of string values into a string map of string pointers
func StringSlice ¶
StringSlice converts a slice of string values into a slice of string pointers
func StringValue ¶
StringValue returns the value of the string pointer passed in or "" if the pointer is nil.
func StringValueMap ¶
StringValueMap converts a string map of string pointers into a string map of string values
func StringValueSlice ¶
StringValueSlice converts a slice of string pointers into a slice of string values
func Strings2MapBool ¶
func Strings2MapString ¶
ss > in[n] > in[n-1] > ... > in[0]
func StructConv ¶
func StructConv(in, out interface{}) interface{}
func StructCopy ¶
func StructCopy(dst, src interface{}) error
func TimeMap ¶
TimeMap converts a string map of time.Time values into a string map of time.Time pointers
func TimeUnixMilli ¶
TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC". The result is undefined if the Unix time cannot be represented by an int64. Which includes calling TimeUnixMilli on a zero Time is undefined.
This utility is useful for service API's such as CloudWatch Logs which require their unix time values to be in milliseconds.
See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information.
func TimeValue ¶
TimeValue returns the value of the time.Time pointer passed in or time.Time{} if the pointer is nil.
func TimeValueMap ¶
TimeValueMap converts a string map of time.Time pointers into a string map of time.Time values
func TimeValueSlice ¶
TimeValueSlice converts a slice of time.Time pointers into a slice of time.Time values
func TitleCasedName ¶
convert like this: "hello_world" to "HelloWorld"
func ToScopeStr ¶
func Uint16Value ¶ added in v0.0.2
func Uint32Value ¶ added in v0.0.2
func Uint64Value ¶ added in v0.0.2
func Uint8Value ¶ added in v0.0.2
func UntilWithTick ¶
Types ¶
type DiffEntity ¶
type DiffEntity interface {
Key() string
}
func Diff4 ¶
func Diff4(src, dst []DiffEntity) (add, del, eq []DiffEntity)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
"github.com/docker/docker/pkg/broadcaster"
|
"github.com/docker/docker/pkg/broadcaster" |
Package connrotation implements a connection dialer that tracks and can close all created connections.
|
Package connrotation implements a connection dialer that tracks and can close all created connections. |
Package daemon provides a Go implementation of the sd_notify protocol.
|
Package daemon provides a Go implementation of the sd_notify protocol. |
Package framer implements simple frame decoding techniques for an io.ReadCloser
|
Package framer implements simple frame decoding techniques for an io.ReadCloser |
golang
|
|
reflect
Package reflect is a fork of go's standard library reflection package, which allows for deep equal with equality functions defined.
|
Package reflect is a fork of go's standard library reflection package, which allows for deep equal with equality functions defined. |
template
This package is copied from Go library text/template.
|
This package is copied from Go library text/template. |
Package inotify implements a wrapper for the Linux inotify system.
|
Package inotify implements a wrapper for the Linux inotify system. |
Package journal provides write bindings to the local systemd journal.
|
Package journal provides write bindings to the local systemd journal. |
Package keyutil contains utilities for managing public/private key pairs.
|
Package keyutil contains utilities for managing public/private key pairs. |
ebtables
Package ebtables allows to control the ebtables Linux-based bridging firewall.
|
Package ebtables allows to control the ebtables Linux-based bridging firewall. |
Package process provides functions for inspecting processes.
|
Package process provides functions for inspecting processes. |
Package rand provides utilities related to randomization.
|
Package rand provides utilities related to randomization. |
types
Package types just provides input types to the set generator.
|
Package types just provides input types to the set generator. |