Documentation ¶
Index ¶
- Constants
- Variables
- func BindEnv()
- func CRC32hash(input []byte) int
- func Contains(s []string, str string) bool
- func FindMatches(pattern string, text []byte) map[string]interface{}
- func InitConfig(configName string) error
- func Md5sum(data string) string
- func Md5sumFile(filePath string) (string, error)
- func Repeat(operation string, tick func(), interval time.Duration, ctx context.Context)
- func SetLogFormatter(timestampFormat string)
- func SetLogLevel(level string)
Constants ¶
const HeartbeatInterval = 5 * time.Second
Variables ¶
var TrentoNamespace = uuid.Must(uuid.Parse("fb92284e-aa5e-47f6-a883-bf9469e7a0dc"))
Functions ¶
func FindMatches ¶
FindMatches finds regular expression matches in a key/value based text (ini files, for example), and returns a map with them. If the matched key has spaces, they will be replaced with underscores If the same keys is found multiple times, the entry of the map will have a list as value with all of the matched values The pattern must have 2 groups. For example: `(.+)=(.*)`
func InitConfig ¶
InitConfig intializes the config for the application If no config file is provided with the --config flag it will look for a config in following locations:
${context} being one of the supported components: agent|web|runner
Order represents priority /etc/trento/${context}.yaml /usr/etc/trento/${context}.yaml $HOME/.config/trento/${context}.yaml
func Md5sumFile ¶
func SetLogFormatter ¶
func SetLogFormatter(timestampFormat string)
func SetLogLevel ¶
func SetLogLevel(level string)
Types ¶
This section is empty.