logger

package
v0.0.0-...-e95c36b Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const INIT_DB = `` /* 1067-byte string literal not displayed */
View Source
const INSERT_LOG = `
	INSERT INTO log_data (time, host, path, method, status_code, latency) VALUES ($1, $2, $3, $4, $5, $6);
`
View Source
const INSERT_SYSTEM_METRICS = `
	INSERT INTO system_metrics (time, cpu, memory) VALUES ($1, $2, $3);
`

Variables

This section is empty.

Functions

This section is empty.

Types

type DBLogger

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

func (*DBLogger) AddLog

func (d *DBLogger) AddLog(time string, host string, path string, method string, status_code int, latency float64)

func (*DBLogger) AddSystemMetrics

func (d *DBLogger) AddSystemMetrics(time string, cpu float64, memory float64)

func (*DBLogger) Close

func (d *DBLogger) Close()

func (*DBLogger) Conn

func (d *DBLogger) Conn()

func (*DBLogger) ExecQuery

func (d *DBLogger) ExecQuery(query string, args ...interface{}) (pgx.Rows, error)

func (*DBLogger) InitDatabase

func (d *DBLogger) InitDatabase()

Jump to

Keyboard shortcuts

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