Documentation
¶
Index ¶
- Constants
- func ConcatFormat(stringList []string) string
- func FormatUUID(uuid *events.UUID) string
- func GetHostIPInfo(host string) (string, string, error)
- func NanoSecondsToSeconds(nanoseconds int64) string
- func ToJson(msg string) interface{}
- type Counter
- type CounterType
- type IntCounter
- type NopCounter
- type Set
Constants ¶
View Source
const ( FloatType = CounterType("float64") UintType = CounterType("uint64") )
Variables ¶
This section is empty.
Functions ¶
func ConcatFormat ¶
func FormatUUID ¶
func GetHostIPInfo ¶
GetHostIPInfo returns hostname and corresponding IP address If empty host is passed in, the current hostname and IP of the host will be returned. If the IP of the hostname can't be resolved, an empty IP and an error will be returned
func NanoSecondsToSeconds ¶
func ToJson ¶
func ToJson(msg string) interface{}
ToJSON tries to detect the JSON pattern for msg first, if msg contains JSON pattern either a map or an array (for efficiency), it will try to convert msg to a JSON object. If the convertion success, a JSON object will be returned. Otherwise the original msg will be returned If the msg param doesn't contain the JSON pattern, the msg will be returned directly
Types ¶
type Counter ¶ added in v1.3.0
type Counter interface { Add(interface{}) Clone() Counter Value() interface{} }
type CounterType ¶ added in v1.3.0
type CounterType string
type IntCounter ¶ added in v1.3.0
type IntCounter uint64
func (*IntCounter) Add ¶ added in v1.3.0
func (ic *IntCounter) Add(num interface{})
func (*IntCounter) Clone ¶ added in v1.3.0
func (ic *IntCounter) Clone() Counter
func (*IntCounter) Value ¶ added in v1.3.0
func (ic *IntCounter) Value() interface{}
type NopCounter ¶ added in v1.3.0
type NopCounter struct{}
func (*NopCounter) Add ¶ added in v1.3.0
func (nc *NopCounter) Add(num interface{})
func (*NopCounter) Clone ¶ added in v1.3.0
func (nc *NopCounter) Clone() Counter
func (*NopCounter) Value ¶ added in v1.3.0
func (nc *NopCounter) Value() interface{}
Click to show internal directories.
Click to hide internal directories.