database

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// QUERY is the query to be made to the timescale instance
	QUERY = `` /* 200-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB structure

func (*DB) Open

func (d *DB) Open(user, pass, host string, port int, dbname string) error

Open a new connection to the database

func (*DB) Run

func (d *DB) Run(hostName string, startTime, endTime time.Time) (Stat, error)

Run and aggregate results

type Stat

type Stat struct {
	HostName      string
	StartTime     time.Time
	EndTime       time.Time
	ExecutionTime time.Duration
}

Stat representation

type StatsReader

type StatsReader interface {
	Run(hostname string, startTime, endTime time.Time) (Stat, error)
}

StatsReader interface

Jump to

Keyboard shortcuts

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