common

package module
v0.0.0-...-40ab0ca Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package common provides common platform integration code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogLevelToZapcore

func LogLevelToZapcore(level protoreflect.EnumNumber) zapcore.Level

LogLevelToZapcore returns the zapcore equivalent of the configuration log level.

func Read

func Read(path string, read ReadConfigFile, config proto.Message) (proto.Message, error)

Read just reads configuration from given file and parses it into config proto. This should be called using the specific protocol buffer message for the config, example:

configuration.Read(d.configFilePath, os.ReadFile, &pb.Configuration{})

Types

type ReadConfigFile

type ReadConfigFile func(string) ([]byte, error)

ReadConfigFile abstracts os.ReadFile function for testability.

Directories

Path Synopsis
Package onetime contains the one time executable commands that can be used by any agent.
Package onetime contains the one time executable commands that can be used by any agent.
Package usagemetrics provides logging utility for the operational status of platform agents.
Package usagemetrics provides logging utility for the operational status of platform agents.

Jump to

Keyboard shortcuts

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