heartbeattest

package
v0.15.8 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 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 added in v0.13.0

type FakeStatusTracker struct {
	Err error
}

FakeStatusTracker provides a fake implementation of HeartbeatStatusTracker.

func (*FakeStatusTracker) Instances added in v0.13.0

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

Instances returns nil.

func (*FakeStatusTracker) Ready added in v0.14.10

func (t *FakeStatusTracker) Ready() bool

Ready returns true when Err is nil, false otherwise.

func (*FakeStatusTracker) RegisterInstance added in v0.13.0

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

RegisterInstance returns the FakeStatusTracker's Err field.

func (*FakeStatusTracker) StopImport added in v0.13.0

func (t *FakeStatusTracker) StopImport()

StopImport does nothing.

func (*FakeStatusTracker) UpdateHealth added in v0.13.0

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

UpdateHealth returns the FakeStatusTracker's Err field.

func (*FakeStatusTracker) UpdatePrometheus added in v0.13.0

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