efm

package
v1.2.0-rc Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EFM_ROUTINE_SLEEP_DURATION = 100 * time.Millisecond

Functions

Types

type HostMonitorConnectionPlugin

type HostMonitorConnectionPlugin struct {
	plugins.BaseConnectionPlugin
	// contains filtered or unexported fields
}

func (*HostMonitorConnectionPlugin) Connect

func (*HostMonitorConnectionPlugin) Execute

func (b *HostMonitorConnectionPlugin) Execute(
	connInvokedOn driver.Conn,
	methodName string,
	executeFunc driver_infrastructure.ExecuteFunc,
	methodArgs ...any) (wrappedReturnValue any, wrappedReturnValue2 any, wrappedOk bool, wrappedErr error)

func (*HostMonitorConnectionPlugin) GetMonitoringHostInfo

func (b *HostMonitorConnectionPlugin) GetMonitoringHostInfo() *host_info_util.HostInfo

For testing purposes only.

func (*HostMonitorConnectionPlugin) GetPluginCode added in v1.1.0

func (b *HostMonitorConnectionPlugin) GetPluginCode() string

func (*HostMonitorConnectionPlugin) GetSubscribedMethods

func (b *HostMonitorConnectionPlugin) GetSubscribedMethods() []string

type HostMonitoringPluginFactory

type HostMonitoringPluginFactory struct {
}

func (HostMonitoringPluginFactory) ClearCaches

func (h HostMonitoringPluginFactory) ClearCaches()

func (HostMonitoringPluginFactory) GetInstance

type Monitor

type Monitor interface {
	StartMonitoring(state *MonitorConnectionState)
	CanDispose() bool
	Close()
}

type MonitorConnectionState

type MonitorConnectionState struct {
	// contains filtered or unexported fields
}

func NewMonitorConnectionState

func NewMonitorConnectionState(connToAbort *driver.Conn) *MonitorConnectionState

func (*MonitorConnectionState) GetConn

func (m *MonitorConnectionState) GetConn() *driver.Conn

func (*MonitorConnectionState) IsActive

func (m *MonitorConnectionState) IsActive() bool

func (*MonitorConnectionState) SetHostUnhealthy

func (m *MonitorConnectionState) SetHostUnhealthy(hostUnhealthy bool)

func (*MonitorConnectionState) SetInactive

func (m *MonitorConnectionState) SetInactive()

func (*MonitorConnectionState) ShouldAbort

func (m *MonitorConnectionState) ShouldAbort() bool

type MonitorImpl

type MonitorImpl struct {
	MonitoringConn driver.Conn

	FailureCount atomic.Int32

	InvalidHostStartTime time.Time
	ActiveStates         *utils.RWQueue[weak.Pointer[MonitorConnectionState]]
	NewStates            *utils.RWMap[time.Time, []weak.Pointer[MonitorConnectionState]]
	Stopped              atomic.Bool
	HostUnhealthy        atomic.Bool
	// contains filtered or unexported fields
}

func NewMonitorImpl

func NewMonitorImpl(
	pluginService driver_infrastructure.PluginService,
	hostInfo *host_info_util.HostInfo,
	props *utils.RWMap[string, string],
	failureDetectionTimeMillis int,
	failureDetectionIntervalMillis int,
	failureDetectionCount int,
	abortedConnectionsCounter telemetry.TelemetryCounter,
) *MonitorImpl

func (*MonitorImpl) CanDispose

func (m *MonitorImpl) CanDispose() bool

func (*MonitorImpl) CheckConnectionStatus

func (m *MonitorImpl) CheckConnectionStatus() bool

func (*MonitorImpl) Close

func (m *MonitorImpl) Close()

func (*MonitorImpl) StartMonitoring

func (m *MonitorImpl) StartMonitoring(state *MonitorConnectionState)

func (*MonitorImpl) UpdateHostHealthStatus

func (m *MonitorImpl) UpdateHostHealthStatus(connIsValid bool, statusCheckStartTime time.Time, statusCheckEndTime time.Time)

type MonitorService

type MonitorService interface {
	StartMonitoring(conn *driver.Conn, hostInfo *host_info_util.HostInfo, props *utils.RWMap[string, string],
		failureDetectionTimeMillis int, failureDetectionIntervalMillis int, failureDetectionCount int, monitorDisposalTimeMillis int) (*MonitorConnectionState, error)
	StopMonitoring(state *MonitorConnectionState, connToAbort driver.Conn)
}

type MonitorServiceImpl

type MonitorServiceImpl struct {
	// contains filtered or unexported fields
}

func NewMonitorServiceImpl

func NewMonitorServiceImpl(pluginService driver_infrastructure.PluginService) (*MonitorServiceImpl, error)

func (*MonitorServiceImpl) StartMonitoring

func (m *MonitorServiceImpl) StartMonitoring(conn *driver.Conn, hostInfo *host_info_util.HostInfo, props *utils.RWMap[string, string],
	failureDetectionTimeMillis int, failureDetectionIntervalMillis int, failureDetectionCount int, monitorDisposalTimeMillis int) (*MonitorConnectionState, error)

func (*MonitorServiceImpl) StopMonitoring

func (m *MonitorServiceImpl) StopMonitoring(state *MonitorConnectionState, connToAbort driver.Conn)

Jump to

Keyboard shortcuts

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