utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupDirectory added in v0.14.0

func BackupDirectory(sourceDir, targetDir, prefix string) error

func ConfigValueToNumber

func ConfigValueToNumber(valueType string, value interface{}) (float64, error)

func DownloadFileFromUrl

func DownloadFileFromUrl(filepath string, url string) error

func GenerateId

func GenerateId(len int) string

func GenerateRandomNumber added in v0.14.0

func GenerateRandomNumber() int32

func IsNumber added in v0.14.0

func IsNumber(valueType string) bool

func RouteIncludesTopic

func RouteIncludesTopic(route, topic string) bool

Types

type LogEntry

type LogEntry struct {
	Component string `json:"comp"`
	FlowId    string `json:"fid"`
	LogLevel  string `json:"level"`
	Msg       string `json:"msg"`
	Time      string `json:"time"`
}

{"comp":"flow","fid":"RMgV2a79wxQMQ2o","level":"info","msg":" Node is loaded and added.","time":"2018-12-24 16:03:29.178"}

func GetLogs

func GetLogs(logFile string, filter *LogFilter, limitLines int) []LogEntry

type LogFilter

type LogFilter struct {
	Component string
	FlowId    string
}

Jump to

Keyboard shortcuts

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