Documentation ¶
Overview ¶
Package cliutils host all public-used golang utils/tools/libs for Guance Cloud.
Index ¶
- Variables
- func CreateRandomString(n int) string
- func Decrypt(endata, phrase []byte) ([]byte, error)
- func Encrypt(data, phrase []byte) ([]byte, error)
- func GZip(data []byte) ([]byte, error)
- func GZipStr(str string) ([]byte, error)
- func LeftStringTrim(s string, n int) string
- func Md5Hash(data []byte) string
- func MustGZip(data []byte) []byte
- func PromTextToMetrics(data io.Reader, measurementPrefix, defaultMeasurement string, t time.Time) ([]*ifxcli.Point, error)
- func SizeFmt(n int64) string
- func StringTrim(s string, n int) string
- func WgWait(wg *sync.WaitGroup, timeout int)
- func XID(p string) string
- type OssCli
- func (oc *OssCli) Download(obj, to string) error
- func (oc *OssCli) GetMeta(obj string) (map[string][]string, error)
- func (oc *OssCli) Init() error
- func (oc *OssCli) ListObjects(prefix, marker string, maxKeys int) (oss.ListObjectsResult, error)
- func (oc *OssCli) Move(from, to string) error
- func (oc *OssCli) Reconnect() error
- func (oc *OssCli) SetMeta(obj string, meta map[string]string) error
- func (oc *OssCli) Stat() string
- func (oc *OssCli) Upload(from, to string) error
- type Sem
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOssFileTooLarge = errors.New(`oss file too large`) DefaultPartSize = int64(32 * 1024 * 1024) //nolint:gomnd // 32MB DefaultTimeout = uint(30) //nolint:gomnd // seconds DefaultWorkers = 8 )
Functions ¶
func CreateRandomString ¶
func LeftStringTrim ¶
func PromTextToMetrics ¶
func StringTrim ¶
Types ¶
Directories ¶
Path | Synopsis |
---|---|
Package cache wraps wal to handle local disk cache.
|
Package cache wraps wal to handle local disk cache. |
cmd
|
|
Package dialtesting defined dialtesting tasks and task implements.
|
Package dialtesting defined dialtesting tasks and task implements. |
Package diskcache is a simple local-disk cache implements.
|
Package diskcache is a simple local-disk cache implements. |
Code generated by goyacc -l -o gram_y.go gram.y.
|
Code generated by goyacc -l -o gram_y.go gram.y. |
Package lineproto wraps influxdb lineprotocol.
|
Package lineproto wraps influxdb lineprotocol. |
Package logger wrapped zap as a basic logging implement.
|
Package logger wrapped zap as a basic logging implement. |
Package metrics implements datakit's Prometheus metrics
|
Package metrics implements datakit's Prometheus metrics |
Package network wraps basic network related implements.
|
Package network wraps basic network related implements. |
http
Package http wraps all HTTP releated common-used utils.
|
Package http wraps all HTTP releated common-used utils. |
ws
Package ws wraps websocket implements among UNIX-like(Linux & macOS) platform
|
Package ws wraps websocket implements among UNIX-like(Linux & macOS) platform |
Package pipeline implement pipeline.
|
Package pipeline implement pipeline. |
manager
Package manager for managing pipeline scripts
|
Package manager for managing pipeline scripts |
manager/relation
Package relation record source-name relation
|
Package relation record source-name relation |
offload
Package offload offload data to other data sinks
|
Package offload offload data to other data sinks |
ptinput
Package ptinput impl ppl input interface
|
Package ptinput impl ppl input interface |
ptinput/funcs
Package funcs for pipeline
|
Package funcs for pipeline |
ptinput/ipdb
Package ipdb define the interface for ip location or isp.
|
Package ipdb define the interface for ip location or isp. |
ptinput/ipdb/geoip
Package geoip implement ipdb.
|
Package geoip implement ipdb. |
ptinput/ipdb/iploc
Package iploc implement ipdb.
|
Package iploc implement ipdb. |
ptinput/plmap
Package plmap used to store data during pl script execution
|
Package plmap used to store data during pl script execution |
ptinput/refertable
Package refertable for saving external data
|
Package refertable for saving external data |
ptinput/utils
Package utils wraps utilities used by pipeline
|
Package utils wraps utilities used by pipeline |
stats
Package stats used to record pl metrics
|
Package stats used to record pl metrics |
pkg
|
|
hash
Package hash used to calculate hash
|
Package hash used to calculate hash |
Package point implements datakits basic data structure.
|
Package point implements datakits basic data structure. |
Package system used to wrap basic system related settings.
|
Package system used to wrap basic system related settings. |
rtpanic
Package rtpanic wraps panic handling during golang app panic.
|
Package rtpanic wraps panic handling during golang app panic. |
Package testutil wraps basic tools when building goalng test cases.
|
Package testutil wraps basic tools when building goalng test cases. |
Package tracer defined basic trace wraps.
|
Package tracer defined basic trace wraps. |
Click to show internal directories.
Click to hide internal directories.