maintenance

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package maintenance provides the maintenance mode monitor

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockMonitor

type MockMonitor struct {
	mock.Mock
}

MockMonitor is an autogenerated mock type for the Monitor type

func NewMockMonitor

func NewMockMonitor(t mockConstructorTestingTNewMockMonitor) *MockMonitor

NewMockMonitor creates a new instance of MockMonitor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockMonitor) InMaintenanceMode

func (_m *MockMonitor) InMaintenanceMode(ctx context.Context) (bool, error)

InMaintenanceMode provides a mock function with given fields: ctx

func (*MockMonitor) Start

func (_m *MockMonitor) Start(ctx context.Context)

Start provides a mock function with given fields: ctx

type Monitor

type Monitor interface {
	// Start starts the maintenance mode monitor
	Start(ctx context.Context)
	// InMaintenanceMode returns true if the system is in maintenance mode
	InMaintenanceMode(ctx context.Context) (bool, error)
}

Monitor is used to monitor the maintenance mode state

func NewMonitor

func NewMonitor(
	logger logger.Logger,
	dbClient *db.Client,
	eventManager *events.EventManager,
) Monitor

NewMonitor returns a new instance of the maintenance mode monitor

Jump to

Keyboard shortcuts

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