context

package
v1.1.6 Latest Latest
Warning

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

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

Documentation

Overview

Package context stores some common information used in various places. The name in hindsight might confuse with the golang package context, 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 Context

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

Context holds the common information

func NewContext

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

NewContext returns the pointer to a new (empty) context

func (Context) DatabaseFilter added in v1.0.3

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

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

func (Context) Hostname

func (c Context) Hostname() string

Hostname returns the current short hostname

func (Context) MySQLVersion

func (c Context) MySQLVersion() string

MySQLVersion returns the current MySQL version

func (*Context) SetWantRelativeStats

func (c *Context) SetWantRelativeStats(w bool)

SetWantRelativeStats tells what we want to see

func (Context) Uptime

func (c Context) Uptime() int

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

func (Context) Variables added in v0.7.6

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

Variables returns a pointer to global.Variables

func (Context) WantRelativeStats

func (c Context) 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