master

package
v0.0.0-...-aa9290f Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MqttHost       string
	MqttPort       int
	MqttUsername   string
	MqttPassword   string
	InfluxdbUrl    string
	InfluxdbApikey string
}

type Log

type Log struct {
	// contains filtered or unexported fields
}

func (*Log) AddLog

func (l *Log) AddLog(topic string, payload []byte)

func (*Log) ClearLogs

func (l *Log) ClearLogs()

func (*Log) GetLogs

func (l *Log) GetLogs() string

type LogWriter

type LogWriter struct {
}

Writes error log entries to error output and everything else to standart output inspired by https://huynvk.dev/blog/4-tips-for-logging-on-gcp-using-golang-and-logrus

func (*LogWriter) Write

func (w *LogWriter) Write(p []byte) (n int, err error)

type Service

type Service struct {
	StopSignal chan os.Signal

	Influxdb influxdb2.Client
	// contains filtered or unexported fields
}

func NewService

func NewService(config Config) *Service

func (*Service) Run

func (srv *Service) Run()

type StacktraceHook

type StacktraceHook struct {
}

func (*StacktraceHook) Fire

func (h *StacktraceHook) Fire(e *logrus.Entry) error

func (*StacktraceHook) Levels

func (h *StacktraceHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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