utils

package
v0.0.0-...-a9119a5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checksum

func Checksum(endpoint string, metric string, tags map[string]string) string

func ChecksumOfUUID

func ChecksumOfUUID(endpoint, metric string, tags map[string]string, dstype string, step int64) string

func CompressStr

func CompressStr(str string) string

func ConunterToMetricAndTags

func ConunterToMetricAndTags(counter string) (metric string, tagM map[string]string)

func Counter

func Counter(metric string, tags map[string]string) string

func DictedTagstring

func DictedTagstring(s string) map[string]string

func InitLogger

func InitLogger() *logging.Logger

func KeysOfMap

func KeysOfMap(m map[string]string) []string

TODO 以下的部分, 考虑放到公共组件库

func Md5

func Md5(raw string) string

func PK

func PK(endpoint, metric string, tags map[string]string) string

func PK2

func PK2(endpoint, counter string) string

func ReadableFloat

func ReadableFloat(raw float64) string

func SortedTags

func SortedTags(tags map[string]string) string

func SplitTagsString

func SplitTagsString(s string) (err error, tags map[string]string)

func UUID

func UUID(endpoint, metric string, tags map[string]string, dstype string, step int) string

func UnixTsFormat

func UnixTsFormat(ts int64) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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