Documentation
¶
Index ¶
- func ErrMsg(err error) string
- func GetHostname() string
- func Keys(m map[string]bool) []string
- func LoadCursor(path string) (string, error)
- func LoadTLSConfig(cfg *config.Config) (*tls.Config, error)
- func Metric(ns, sub, name string, value interface{}, typ, unit string, ...) model.Metric
- func SaveCursor(path, cursor string) error
- func ToFloat64(v interface{}) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrMsg ¶
ErrMsg returns the error message if err is not nil, otherwise returns an empty string.
func GetHostname ¶
func GetHostname() string
GetHostname returns the system hostname, or "unknown" if it can't be determined.
func LoadCursor ¶
LoadCursor reads the last saved journald cursor from a file. It returns an empty string and nil error if the file does not exist.
func LoadTLSConfig ¶
LoadTLSConfig loads the TLS configuration for the agent. It reads the CA certificate and client certificate/key from the specified paths. It returns a tls.Config object that can be used for secure communication.
func SaveCursor ¶
SaveCursor writes the given journald cursor to a file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.