config

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package config stores some common information used in various places. The name in hindsight might confuse with the golang package config, though there is no relation between the two.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config holds the common information

func NewConfig

func NewConfig(status *global.Status, variables *global.Variables, databaseFilter *filter.DatabaseFilter, wantRelativeStats bool) *Config

NewConfig returns the pointer to a new (empty) config

func (Config) DatabaseFilter

func (c Config) DatabaseFilter() *filter.DatabaseFilter

DatabaseFilter returns the database filter to apply on queries (if appropriate)

func (Config) Hostname

func (c Config) Hostname() string

Hostname returns the current short hostname

func (Config) MySQLVersion

func (c Config) MySQLVersion() string

MySQLVersion returns the current MySQL version

func (*Config) SetWantRelativeStats

func (c *Config) SetWantRelativeStats(w bool)

SetWantRelativeStats tells what we want to see

func (Config) Uptime

func (c Config) Uptime() int

Uptime returns the time that MySQL has been up (in seconds)

func (Config) Variables

func (c Config) Variables() *global.Variables

Variables returns a pointer to global.Variables

func (Config) WantRelativeStats

func (c Config) WantRelativeStats() bool

WantRelativeStats tells us what we have asked for

Jump to

Keyboard shortcuts

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