gmondtest

package
v0.0.0-...-1a92b66 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2015 License: BSD-3-Clause Imports: 15 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
	StopTimeout time.Duration
	// 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

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

func (*Harness) ContainsMetric

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

ContainsMetric checks if associated gmond instance contains the given metric.

func (*Harness) State

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

State 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