heartbeattest

package
v0.4.101 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// FakeMemorystoreClient provides an implementation of MemorystoreClient for testing.
	FakeMemorystoreClient = fakeMemorystoreClient[v2.HeartbeatMessage]{
							// contains filtered or unexported fields
	}
	// FakeErrorMemorystoreClient provides an implementation that returns errors
	// for all its methods.
	FakeErrorMemorystoreClient = fakeErrorMemorystoreClient[v2.HeartbeatMessage]{}
	// FakeError defines an error to be returned by the implementation of FakeErrorMemorystoreClient.
	FakeError = errors.New("error for FakeErrorMemorystoreClient")
)

Functions

This section is empty.

Types

type FakeStatusTracker

type FakeStatusTracker struct {
	Err error
}

FakeStatusTracker provides a fake implementation of HeartbeatStatusTracker.

func (*FakeStatusTracker) Instances

func (t *FakeStatusTracker) Instances() map[string]v2.HeartbeatMessage

Instances returns nil.

func (*FakeStatusTracker) Ready

func (t *FakeStatusTracker) Ready() bool

Ready returns true when Err is nil, false otherwise.

func (*FakeStatusTracker) RegisterInstance

func (t *FakeStatusTracker) RegisterInstance(rm v2.Registration) error

RegisterInstance returns the FakeStatusTracker's Err field.

func (*FakeStatusTracker) StopImport

func (t *FakeStatusTracker) StopImport()

StopImport does nothing.

func (*FakeStatusTracker) UpdateHealth

func (t *FakeStatusTracker) UpdateHealth(hostname string, hm v2.Health) error

UpdateHealth returns the FakeStatusTracker's Err field.

func (*FakeStatusTracker) UpdatePrometheus

func (t *FakeStatusTracker) UpdatePrometheus(hostnames, machines map[string]bool) error

UpdatePrometheus returns the FakeStatusTracker's Err field.

Jump to

Keyboard shortcuts

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