metrics

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDatabaseName

func GetDatabaseName(dataModel interface{}) (string, error)

GetDatabaseName returns the database name for the object

func GetIndexName

func GetIndexName(dataModel interface{}) (string, error)

GetIndexName returns the index name

func GetSchemaName

func GetSchemaName(dataModel interface{}) (string, error)

GetSchemaName returns a schema name

func GetTableName

func GetTableName(dataModel interface{}) (string, error)

GetTableName returns the table name

func PopulateDatabaseMetrics

func PopulateDatabaseMetrics(databases args.DatabaseList, version *semver.Version, integration *integration.Integration, connection *connection.PGSQLConnection, hostname string)

PopulateDatabaseMetrics populates the metrics for a database

func PopulateIndexMetrics

func PopulateIndexMetrics(databases args.DatabaseList, integration *integration.Integration, ci connection.Info)

PopulateIndexMetrics populates the metrics for an index

func PopulateInstanceMetrics

func PopulateInstanceMetrics(instanceEntity *integration.Entity, version *semver.Version, connection *connection.PGSQLConnection, hostname string)

PopulateInstanceMetrics populates the metrics for an instance

func PopulateMetrics

func PopulateMetrics(ci connection.Info, databaseList args.DatabaseList, instance *integration.Entity, i *integration.Integration, collectPgBouncer bool)

PopulateMetrics collects metrics for each type

func PopulatePgBouncerMetrics

func PopulatePgBouncerMetrics(integration *integration.Integration, con *connection.PGSQLConnection, hostname string)

PopulatePgBouncerMetrics populates pgbouncer metrics

func PopulateTableMetrics

func PopulateTableMetrics(databases args.DatabaseList, integration *integration.Integration, ci connection.Info)

PopulateTableMetrics populates the metrics for a table

Types

type DatabaseModeler

type DatabaseModeler interface {
	GetDatabaseName() (string, error)
}

DatabaseModeler is an interface to represent somethign which has a database field

type IndexModeler

type IndexModeler interface {
	GetIndexName() (string, error)
}

IndexModeler represents something with a table field

type QueryDefinition

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

QueryDefinition holds the query and the unmarshall model

func (QueryDefinition) GetDataModels

func (qd QueryDefinition) GetDataModels() interface{}

GetDataModels returns the data models of the QueryDefinition

func (QueryDefinition) GetQuery

func (qd QueryDefinition) GetQuery() string

GetQuery returns the query of the QueryDefinition

type SchemaModeler

type SchemaModeler interface {
	GetSchemaName() (string, error)
}

SchemaModeler is an interface to represent something which has a schema field

type TableModeler

type TableModeler interface {
	GetTableName() (string, error)
}

TableModeler is an interface to represent something which has a table field

Jump to

Keyboard shortcuts

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