database

package
v0.0.0-...-3e4b007 Latest Latest
Warning

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

Go to latest
Published: May 26, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

tsadmin/database

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Name     string `json:"name"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
	User     string `json:"username"`
	Password string `json:"password"`
}

func (*Database) String

func (db *Database) String() string

type DatabaseMetadata

type DatabaseMetadata struct {
	Name string `json:"name"`
	Host string `json:"host"`
	Port int    `json:"port"`
}

type DatabaseMetrics

type DatabaseMetrics struct {
	CurrentConnections          int `json:"current_connections"`
	ConnectionsPerSecond        int `json:"connections_per_second"`
	AbortedConnectionsPerSecond int `json:"aborted_connections_per_second"`
	QueriesPerSecond            int `json:"queries_per_second"`
	ReadsPerSecond              int `json:"reads_per_second"`
	WritesPerSecond             int `json:"writes_per_second"`
	Uptime                      int `json:"uptime"`
	// contains filtered or unexported fields
}

type DatabaseStatus

type DatabaseStatus struct {
	Metadata  DatabaseMetadata  `json:"metadata"`
	Metrics   DatabaseMetrics   `json:"metrics"`
	Variables DatabaseVariables `json:"variables"`
}

func Status

func Status(db Database, previous *DatabaseStatus) (*DatabaseStatus, error)

type DatabaseVariables

type DatabaseVariables struct {
	MaxConnections int `json:"max_connections"`
}

Jump to

Keyboard shortcuts

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