dbhandler

package
v0.0.0-...-2a235c3 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2020 Red Hat, Inc. jcope@redhat.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const Table = "caliper_metrics"

Table is a hardcoded table name. Will be replaced with dynamically set names.

View Source
const TimestampFormat = `2006-01-02 15:04:05`

Variables

This section is empty.

Functions

func ColumnsHeaders

func ColumnsHeaders() []string

ColumnsHeaders defines the expected headers` for the metrics table and exists to provide a source of truth for our table format.

func NewPostgresClient

func NewPostgresClient() (*sqlx.DB, error)

Types

type PostgresConfig

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

func (PostgresConfig) String

func (p PostgresConfig) String() string

type Row

type Row struct {
	Version   string  `db:"version"`
	Metric    string  `db:"metric"`
	Pod       string  `db:"pod"`
	Range     string  `db:"range"`
	Namespace string  `db:"namespace"`
	OwnerName string  `db:"owner_name"`
	Node      string  `db:"node"`
	QueryTime string  `db:"query_time"`
	Q95Value  float64 `db:"q95_value"`
	AvgValue  float64 `db:"avg_value"`
	MaxValue  float64 `db:"max_value"`
	MinValue  float64 `db:"min_value"`
	InstValue float64 `db:"inst_value"`
}

func (*Row) String

func (r *Row) String() string

Jump to

Keyboard shortcuts

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