harness

package
v2.19.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EtcdBinPath is the path to the etcd binary.
	EtcdBinPath = "etcd"

	// EtcdUsername is the username to etcd cluster.
	EtcdUsername = "user"
	// EtcdPassword is the password for the EtcdUsername.
	EtcdPassword = "password"
)
View Source
const (
	// PrometheusBinPath is the path to the prometheus binary.
	PrometheusBinPath = "prometheus"
	// PrometheusLocalAddress is the local address to bind prometheus to.
	PrometheusLocalAddress = "127.0.0.1:9095"
)

Variables

This section is empty.

Functions

func AllocateLocalAddress

func AllocateLocalAddress(address string) (string, error)

AllocateLocalAddress listens on the given address and returns it.

func LocalBinAvailable

func LocalBinAvailable(path string) (string, error)

LocalBinAvailable returns true if the binary is available on PATH.

Types

type EtcdHarness

type EtcdHarness struct {
	Client   *clientv3.Client
	Endpoint string
	// contains filtered or unexported fields
}

EtcdHarness represents a running etcd server for an integration test environment.

func NewEtcdHarness

func NewEtcdHarness(etcdErrWriter io.Writer) (*EtcdHarness, error)

NewEtcdHarness initializes a harnessed etcd server and returns the EtcdHarness.

func (*EtcdHarness) Stop

func (h *EtcdHarness) Stop()

Stop kills the harnessed etcd server and cleans up the etcd directory.

type PrometheusHarness

type PrometheusHarness struct {
	Endpoint string
	// contains filtered or unexported fields
}

PrometheusHarness represents a running prometheus server for an integration test environment.

func NewPrometheusHarness

func NewPrometheusHarness(prometheusWriter io.Writer) (*PrometheusHarness, error)

NewPrometheusHarness initializes a harnessed prometheus server and returns the PrometheusHarness.

func (*PrometheusHarness) Stop

func (p *PrometheusHarness) Stop()

Stop kills the harnessed prometheus server and cleans up the prometheus directory.

Jump to

Keyboard shortcuts

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