gmondtest

package
v0.0.0-...-6c495b1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2013 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package gmondtest provides test helpers for gmond.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Harness

type Harness struct {
	Client *gmetric.Client
	// contains filtered or unexported fields
}

The Harness provides an unique instance of gmond suitable for use in testing. Use NewHarness to create a Harness and start the gmond server, and ensure you 'defer h.Stop()' to shutdown the gmond server once the test has finished.

func NewHarness

func NewHarness(t *testing.T) *Harness

Create a new Harness. It will start the server and initialize the container Client.

func (*Harness) ContainsMetric

func (h *Harness) ContainsMetric(m *gmon.Metric)

Check if associated gmond instance contains the given metric.

func (*Harness) State

func (h *Harness) State() *gmon.Ganglia

Returns the current state of the associated gmond instance.

func (*Harness) Stop

func (h *Harness) Stop()

Stop the associated gmond server.

Jump to

Keyboard shortcuts

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