monitor

package
v0.0.0-...-ff1c2b8 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 39 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runnable

type Runnable interface {
	Run(context.Context) error
}

func NewMonitor

func NewMonitor(log *logrus.Entry, dialer proxy.Dialer, dbGroup monitorDBs, m, clusterm metrics.Emitter, e env.Interface) Runnable

type TestEnvironment

type TestEnvironment struct {
	OpenShiftClusterDB     database.OpenShiftClusters
	SubscriptionsDB        database.Subscriptions
	MonitorsDB             database.Monitors
	OpenShiftClusterClient *cosmosdb.FakeOpenShiftClusterDocumentClient
	SubscriptionsClient    *cosmosdb.FakeSubscriptionDocumentClient
	FakeMonitorsDBClient   *cosmosdb.FakeMonitorDocumentClient
	Controller             *gomock.Controller
	TestLogger             *logrus.Entry
	Dialer                 *mock_proxy.MockDialer
	MockEnv                *mock_env.MockInterface
	NoopMetricsEmitter     noop.Noop
	NoopClusterMetrics     noop.Noop
	DBGroup                monitorDBs
}

TestEnvironment contains all the test setup components

func SetupTestEnvironment

func SetupTestEnvironment(t *testing.T) *TestEnvironment

SetupTestEnvironment creates a common test environment for monitor tests

func (*TestEnvironment) Cleanup

func (env *TestEnvironment) Cleanup()

Cleanup performs test cleanup

func (*TestEnvironment) CreateTestMonitor

func (env *TestEnvironment) CreateTestMonitor(loggerField string) *monitor

CreateTestMonitor creates a single monitor with test configuration

Directories

Path Synopsis
azure
nsg

Jump to

Keyboard shortcuts

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